<template>
  <div>
    <el-card class="box-card">
      <el-form
        :inline="true"
        :model="dataForm"
        @keyup.enter.native="getExportDispatchList()"
        class="dadeFrom"
      >
        <el-select
          v-model="dataForm.sendType"
          placeholder="推送方式"
          clearable
          style="width: 200px"
        >
          <el-option label="推送升级" value="1"></el-option>
          <el-option label="普通推送" value="0"></el-option>
        </el-select>
        <el-select
          v-model="dataForm.masterValue"
          placeholder="选择主数据群组"
          clearable
          style="width: 200px"
        >
          <el-option
            :label="item.dictName"
            :value="item.id"
            v-for="(item, index) in lableList"
            :key="index"
          ></el-option>
        </el-select>
        <el-select
          v-model="dataForm.iworkValue"
          style="width: 200px"
          clearable
          placeholder="选择Iwork群组"
        >
          <el-option
            :label="item.dictName"
            :value="item.dictValue"
            v-for="(item, index) in groupList"
            :key="index"
          ></el-option>
        </el-select>
        <!-- <el-input v-model="dataForm.numVaue" placeholder="请输入工号"  style="width: 200px;"></el-input>
        <el-input v-model="dataForm.nameValue" placeholder="请输入姓名"  style="width: 200px;"></el-input> -->
        <el-select
          v-model="dataForm.secenValue"
          style="width: 200px"
          clearable
          placeholder="请选择场景"
        >
          <el-option
            :label="item.dictName"
            :value="item.dictValue"
            v-for="(item, index) in actTableData"
            :key="index"
          ></el-option>
        </el-select>
        <el-input
          v-model="dataForm.staffValue"
          placeholder="请输入员工账号或名称"
          style="width: 200px"
        ></el-input>
        <!-- <el-select
          v-model="dataForm.isOnlyScene"
          style="width: 200px"
          clearable
          placeholder="场景是否唯一"
        >
          <el-option
            :label="item.label"
            :value="item.value"
            v-for="(item, index) in isOnlySceneData"
            :key="index"
          ></el-option>
        </el-select> -->
        <!-- <el-select v-model="dataForm.mode"
                   placeholder="推送模式"
                   clearable
                   style="width: 200px">
          <el-option label="群组"
                     value="1"></el-option>
          <el-option label="个人"
                     value="0"></el-option>
        </el-select> -->
        <!-- <el-date-picker v-model="dataForm.timeVal"
                        type="datetime"
                        value-format="yyyy-MM-dd HH:mm:ss"
                        placeholder="选择日期时间">
        </el-date-picker> -->
        <el-button @click="searchData()" type="primary">查询</el-button>
      </el-form>
    </el-card>
    <el-card class="box-card" style="margin-top: 10px">
      <el-button type="primary" size="mini" @click="handleAdd">新增</el-button>
      <el-button type="danger" size="mini" @click="handleDelete()"
        >批量删除</el-button
      >
      <el-table
        :data="dataList"
        style="width: 100%; margin-top: 20px"
        @selection-change="handleSelectionChange"
        v-loading="loadingTow"
        element-loading-text="拼命加载中"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(12,42,98, 0.9)"
        :default-sort="{ prop: 'date', order: 'descending' }"
      >
        <el-table-column type="selection"> </el-table-column>
        <!-- <el-table-column label="id" prop="id" align="center" width="60">
        </el-table-column> -->
        <el-table-column label="id" prop="id" align="center" width="80">
        </el-table-column>
        <el-table-column
          label="推送活动类型"
          prop="activityName"
          align="center"
          width="150"
        >
        </el-table-column>
        <el-table-column
          prop="sendType"
          width="120"
          label="推送方式"
          align="center"
        >
          <template slot-scope="scope">
            <span
              class="green el-tag el-tag-warn"
              v-if="scope.row.sendType === 1"
              >推送升级</span
            >
            <span class="el-tag el-tag-black" v-if="scope.row.sendType === 0"
              >普通推送</span
            >
          </template>
        </el-table-column>
        <el-table-column label="推送对象" fit="true" width="160" align="center">
          <template slot-scope="scope">
            <!-- <el-popover trigger="hover" placement="top">
              <p>推送对象:{{ getSendObject(scope.row) }}</p>
              <div slot="reference" class="name-wrapper">
                <span class="green el-tag el-tag-warn">
                  {{ getSendObject(scope.row) }}
                </span>
              </div>
            </el-popover> -->
            <span class="green el-tag el-tag-warn push_tag">
              {{ getSendObject(scope.row) }}
            </span>
          </template>
        </el-table-column>
        <el-table-column label="是否定时" width="110" align="center">
          <template slot-scope="scope">
            <span
              class="green el-tag el-tag-warn"
              v-if="scope.row.isTiming == 1"
              >单次发送</span
            >
            <span class="el-tag el-tag-black" v-else>定时推送</span>
          </template>
        </el-table-column>

        <el-table-column label="状态" width="100" align="center">
          <template slot-scope="scope">
            <span
              class="green el-tag el-tag-warn"
              v-if="scope.row.sendStatus === 1"
              >已推送</span
            >
            <span class="el-tag el-tag-black" v-else>未推送</span>
            <div v-if="scope.row.isTiming == 0">
              <span v-if="scope.row.sendTimeType == 17">
                (每日：{{ scope.row.sendTime }})
              </span>
              <span v-if="scope.row.sendTimeType == 19">
                (每月：{{ scope.row.sendTime.slice(8, 10) }}日
                {{ scope.row.sendTime.slice(11, scope.row.sendTime.length) }})
              </span>
            </div>
          </template>
        </el-table-column>
        <el-table-column label="城市" align="center" width="100">
          <template slot-scope="scope">
            <span v-html="getIWorkCity(scope.row)"></span>
          </template>
        </el-table-column>
        <el-table-column label="推送人" align="center" width="100">
          <template slot-scope="scope">
            <span v-html="getIWorkState(scope.row)"></span>
          </template>
        </el-table-column>
        <el-table-column
          prop="createTime"
          width="100"
          label="添加日期"
          align="center"
          sortable
        >
        </el-table-column>
        <!-- <el-table-column label="Iwork推送人数"
                         prop="sendTime"
                         align="center">
          <template slot-scope="scope">
            <span class="red">{{scope.row.sendCount}}</span>
          </template>
        </el-table-column> -->
        <el-table-column label="Iwork已读" prop="sendTime" align="center">
          <template slot-scope="scope">
            <span class="red"
              >{{ scope.row.redCount ? scope.row.redCount : 0 }}/{{
                scope.row.sendCount ? scope.row.sendCount : 0
              }}</span
            >
          </template>
        </el-table-column>
        <el-table-column label="已发短信" prop="sendTime" align="center">
          <template slot-scope="scope">
            <span class="red">{{
              scope.row.shortCount ? scope.row.shortCount : 0
            }}</span>
          </template>
        </el-table-column>
        <el-table-column label="外呼" prop="sendTime" align="center">
          <template slot-scope="scope">
            <span class="red"
              >{{ scope.row.aiCountSuccess ? scope.row.aiCountSuccess : 0 }}/{{
                scope.row.aiCount ? scope.row.aiCount : 0
              }}</span
            >
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" width="350">
          <template slot-scope="scope">
            <el-button
              type="success"
              size="mini"
              @click="handleDetail(scope.row.id)"
              >详情</el-button
            >
            <!-- :disabled="scope.row.sendStatus === 1" 测试的时候吧disable去掉了，测试完要加回来 :disabled="scope.row.sendStatus === 1"-->
            <el-button
              type="primary"
              size="mini"
              :disabled="scope.row.sendStatus === 1"
              @click="handleEdit(scope.row)"
              >编辑</el-button
            >
            <!-- :disabled="scope.row.sendStatus === 1 || scope.row.isTiming == 0" -->
            <el-button
              size="mini"
              type="warning"
              @click="handleOpenOrClose(scope.row.id, 1)"
              v-if="scope.row.isTiming == 0 && scope.row.status == 0"
              >开启</el-button
            >
            <el-button
              size="mini"
              type="warning"
              @click="handleOpenOrClose(scope.row.id, 0)"
              v-if="scope.row.isTiming == 0 && scope.row.status == 1"
              >关闭</el-button
            >
            <el-button
              size="mini"
              type="success"
              v-if="scope.row.isTiming == 1"
              @click="handlePushPerson(scope.row.id)"
              >推送</el-button
            >
            <!-- <el-button size="mini"
                       type="success"
                       @click="insertWaihuLog(scope.row.id)">外呼记录</el-button> -->
            <el-button
              size="mini"
              type="danger"
              @click="handleDelete(scope.row.id)"
              >删除</el-button
            >

            <!-- <el-button size="mini" type="warning" @click="handleOpenPush(scope.row.id)">开启</el-button> -->
          </template>
        </el-table-column>
      </el-table>
      <!-- 分页 -->
      <Pagination
        :total="total"
        :pageNum="pageNum"
        :pageSize="pageSize"
        @pageChange="pageChange"
      />
    </el-card>
    <!-- 弹窗, 新增 / 修改 -->
    <el-dialog
      title="填写信息"
      :close-on-click-modal="false"
      :visible.sync="dialogVisible"
      width="80%"
      @close="closeDialog"
    >
      <el-form ref="form" :model="form" label-width="160px">
        <!-- 重点: 选择图片或文本 暂时注释  -->
        <!-- <el-form-item label="推送内容">
          <el-radio-group
            v-model="form.imgOrTextVal"
            @change="handleChangeImgOrText()"
          >
            <el-radio :label="0">图片</el-radio>
            <el-radio :label="1">文本</el-radio>
          </el-radio-group>
        </el-form-item> -->
        <!-- <el-form-item v-if="isImgShow"
                      label="选择活动"> -->
        <!-- <el-radio-group class="group"
                          @change="handleActSecon()"
                          v-model="form.checkedCities">
            <el-radio v-for="item in activeList"
                      :label="item.id +','+item.name"
                      :key="item.id">
              <div>
                <h5>{{item.name}}</h5>
                <img :src="item.url"
                     alt=""
                     style="width: 100%;height: 140px;">
                <div class="preview">
                  <el-button @click="handlePreview(item.id)"
                             type="text">预览</el-button>
                </div>
              </div>
            </el-radio>
          </el-radio-group> -->
        <!-- <el-button type="text" @click="handleChangeAct">选择活动</el-button> -->

        <!-- <button class="button"
                  @click="handleChangeAct">选择活动</button> -->
        <!-- </el-form-item> -->
        <el-form-item label="选择场景" v-if="isImgShow">
          <el-input :disabled="true" v-model="actVal" style="width: 300px">
          </el-input>
          <el-button type="primary" @click="handleChangeAct">{{
            actVal ? actVal : "选择"
          }}</el-button>
          <el-button @click="handleDelAct()">清空</el-button>
          <span v-if="this.form.checkedCitiesNum === 'kd_szh'">
            执行标准:
            <el-input
              class="input_num"
              placeholder=""
              style="width: 210px"
              v-model="form.calledNum"
              min="0"
              clearable
              @input="handleInput"
              type="number"
              oninput="value=value.replace(/[^0-9]/g,'')"
              v-model.number="form.calledNum"
            >
            </el-input>
          </span>
        </el-form-item>

        <el-form-item label="选取推送场景" v-if="!isImgShow">
          <el-select
            v-model="form.titleval"
            style="width: 300px"
            placeholder="选取推送场景"
            @change="changeTitleCon()"
            :disabled="isDisbaled"
          >
            <el-option
              :label="item.dictName"
              :value="item.dictName + ',' + item.remark"
              v-for="item in titleList"
              :key="item.id"
            ></el-option>
          </el-select>
          <!-- <el-form-item label="执行标准" prop=""> -->
          <span v-if="this.form.checkedCities.split(',')[0] === 'kd_szh'">
            执行标准:<el-input
              class="input_num"
              placeholder=""
              style="width: 210px"
              v-model="form.calledNum"
              min="0"
              clearable
              oninput="value=value.replace(/[^0-9]/g,'')"
              @input="handleInput"
              type="number"
            >
            </el-input>
          </span>
          <!-- </el-form-item> -->
        </el-form-item>
        <el-form-item label="公司应用名称" v-if="qywxShow">
          <el-select
            v-model="form.wecomCompany"
            style="width: 300px"
            placeholder="选取公司应用名称"
            @change="changeWeCome()"
          >
            <el-option
              :label="item.companyName"
              :value="item.companyName"
              v-for="item in qiyeList"
              :key="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <!-- 这里是之前的场景信息 v-if="!wuhuCity"-->
        <div>
          <el-form-item label="场景类别" v-if="sceneCategoryShow">
            <el-select
              v-model="form.titlevalDictValue"
              style="width: 300px"
              placeholder="选取场景类别"
              @change="changeChoice()"
              :disabled="isDisbaled"
            >
              <!-- <el-option label="异网营销" value="ydyj"></el-option> -->
              <!--<el-option label="融转单" value="rzt"></el-option>
            <el-option label="底签倾向" value="rzt"></el-option> -->
              <el-option
                :label="item.dictName"
                :value="item.dictValue"
                v-for="item in titleListN"
                :key="item.id"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="选取推送层级" v-if="pushlevelShow">
            <!-- <div  > -->
            <el-select
              v-model="form.sendUnitType"
              style="width: 300px"
              placeholder="选取层级"
              @change="changeUnitType()"
              clearable
            >
              <el-option
                :label="item.label"
                :value="item.value"
                v-for="item in pushLevel"
                :key="item.id"
              ></el-option>
            </el-select>
            <span style="color: red">
              温馨提示: "最新异动预警数据预计14:30生成"</span
            >
            <!-- </div> -->
          </el-form-item>
          <el-form-item label="活动名称" v-if="isActShow">
            <el-select
              v-model="form.actSecenVal"
              placeholder="请选择活动名称"
              style="width: 300px"
            >
              <el-option
                :label="item.actName"
                :value="item.actId"
                v-for="(item, index) in actSecenlist"
                :key="index"
              ></el-option>
            </el-select>
          </el-form-item>
          <!-- <el-form-item label="监控门店类型" v-if="isTreeShow">
          <el-input
            :disabled="true"
            v-model="selectTreeData.ssName"
            style="width: 300px"
          >
          </el-input>
          <el-button
            type="primary"
            @click="handleChangeStore('监控门店类型')"
            >{{ "选择" }}</el-button
          >
          <el-button @click="handleDelAct()">清空</el-button>
        </el-form-item> -->
          <div v-if="isTreeShow && isTextShow">
            <el-form-item label="活动名称">
              <el-input
                :disabled="true"
                v-model="selectTreeData.actName"
                style="width: 300px"
              >
              </el-input>
              <el-button type="primary" @click="handleChangeActivity()">{{
                "选择"
              }}</el-button>
              <el-button @click="handleDelAct()">清空</el-button>
              <span style="color: red">
                温馨提示: "最新场景数据预计14:00生成"</span
              >
            </el-form-item>
            <el-form-item label="触发类型">
              <el-select
                v-model="dictValue"
                @change="choiceDictType(dictValue)"
                placeholder="请选择"
                clearable
                style="width: 210px"
              >
                <el-option
                  :label="item.dictName"
                  :value="item.dictValue"
                  v-for="(item, index) in triggerList"
                  :key="index"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="达标条件(户)">
              <el-input
                class="input_num"
                placeholder=""
                style="width: 210px"
                v-model="form.calledNum"
                min="0"
                clearable
                @input="handleInput"
                type="number"
                oninput="value=value.replace(/[^0-9]/g,'')"
                v-model.number="form.calledNum"
              >
              </el-input>
            </el-form-item>
          </div>
          <el-form-item label="推送标题" v-if="!isImgShow && qzwbtsShow">
            <!-- <el-form-item label="推送标题" v-if="!isImgShow"> -->
            <el-input
              v-model="form.titleName"
              placeholder="请输入标题"
              :disabled="getDisabled(isTrue)"
              maxlength="20"
              show-word-limit
            ></el-input>
          </el-form-item>
          <el-form-item label="推送类型" v-if="!qzwbtsShow">
            <el-input
              placeholder="Iwork群组"
              disabled
              style="width: 300px"
            ></el-input>
          </el-form-item>
          <el-form-item label="选择数据表" v-if="wuhuCity">
            <el-select
              v-model="form.tableName"
              style="width: 300px"
              placeholder="选择数据表"
              @change="changeTitleConWuHu()"
              :disabled="isDisbaled"
            >
              <el-option
                label="lan553.tb_zj_clwx_2j_qd"
                value="cpcp_tb_zj_clwx_2j_qd"
              ></el-option>
              <el-option
                label="lan553.tb_zj_clwx_3j_qd"
                value="cpcp_tb_zj_clwx_3j_qd"
              ></el-option>
              <el-option
                label="lan553.tb_zj_clwx_4j_qd"
                value="cpcp_tb_zj_clwx_4j_qd"
              ></el-option>
              <el-option
                label="lan553.tb_zj_clwx_5j_qd"
                value="cpcp_tb_zj_clwx_5j_qd"
              ></el-option>
            </el-select>
          </el-form-item>
          <el-form-item
            label="推送内容"
            v-if="!contentShow"
            style="position: relative"
          >
            <el-input
              type="textarea"
              v-model="form.desc"
              placeholder="请输入要推送的内容，只支持文本"
              :disabled="getDisabled(isTrue)"
              maxlength="200"
              show-word-limit
              @blur="testBlur"
              ref="textarea"
            ></el-input>
            <!-- 移动预警 - 使用 -->
            <el-button
              type="primary"
              v-if="pushlevelShow"
              class="charuBianLiang"
              @click="bianliangBtn()"
              size="mini"
              >插入变量</el-button
            >
            <!-- UIM卡运营数字化 - 使用 -->
            <el-button
              type="primary"
              v-if="pushlevelShowTow"
              class="charuBianLiang"
              @click="bianliangBtnTow()"
              size="mini"
              >插入变量</el-button
            >
            <!-- 芜湖场景 - 使用 -->
            <el-button
              type="primary"
              v-if="pushlevelShowWuHu"
              class="charuBianLiang"
              @click="bianliangBtnTowWuHu()"
              size="mini"
              >插入变量</el-button
            >
            <el-button
              type="success"
              v-if="pushlevelShowWuHu"
              class="charuImgas"
              @click="imgBtnTowWuHu()"
              size="mini"
              >数据展示</el-button
            >
            <el-button
              type="success"
              v-if="pushlevelShow"
              size="mini"
              class="charuImgas"
              @click="imgsBtn()"
              >查看图片</el-button
            >
          </el-form-item>

          <el-form-item v-if="!imageShow">
            <div v-if="this.imagesType === '2'">
              <div>
                <img
                  src="http://134.64.251.212:8084/cpcp/imgUrl/two.png"
                  alt=""
                />
              </div>
              <div style="margin-top: 5px">
                <img
                  src="http://134.64.251.212:8084/cpcp/imgUrl/three.png"
                  alt=""
                />
              </div>
            </div>
            <div v-if="this.imagesType === '3'">
              <img
                src="http://134.64.251.212:8084/cpcp/imgUrl/three.png"
                alt=""
              />
            </div>
            <div v-if="this.imagesType === '4'">
              <img
                src="http://134.64.251.212:8084/cpcp/imgUrl/four.png"
                alt=""
              />
            </div>
          </el-form-item>
          <el-form-item label="推送内容" v-if="!tinymceisImgShow">
            <editor
              id="tinymce"
              @compositionstart="compositionstart"
              v-model="form.desc"
              :init="init"
            ></editor>
            <!-- <button @click="btn">点击</button> -->
          </el-form-item>
          <!-- 企业微信场景使用 -->
          <el-form-item label="推送内容" v-if="qywxShow">
            <editor
              id="tinymce"
              @compositionstart="compositionstart"
              v-model="form.desc"
              :init="init"
            ></editor>
            <!-- <button @click="btn">点击</button> -->
          </el-form-item>
          <div v-if="upgradeShow">
            <el-form-item label="是否向上升级">
              <el-radio
                v-model="form.isUpgrade"
                label="1"
                @change="changeRadio(form.isUpgrade)"
                >是</el-radio
              >
              <el-radio
                v-model="form.isUpgrade"
                label="0"
                @change="changeRadio(form.isUpgrade)"
                >否</el-radio
              >
            </el-form-item>
          </div>
          <el-form-item label="推送对象" v-if="pushObjShow">
            <el-button type="primary" size="mini" @click="pushButton">{{
              pushObjName
            }}</el-button>
          </el-form-item>
          <el-form-item
            label="升级条件"
            v-if="
              form.isUpgrade == '1' &&
              (form.sendUnitType === '4' || form.sendUnitType === '5')
            "
          >
            <el-select v-model="form.filterType" placeholder="请选择升级条件">
              <el-option
                :label="item.label"
                :value="item.value"
                v-for="(item, index) in upgradeData"
                :key="index.value"
              ></el-option>
            </el-select>
            触发条件：
            <el-select v-model="form.filterCondit" placeholder="请选择触发条件">
              <el-option
                :label="item.label"
                :value="item.value"
                v-for="(item, index) in triggerData"
                :key="index.value"
              ></el-option>
            </el-select>
            <el-input-number
              v-model="form.threshold"
              :min="0"
              :max="100"
              :controls="false"
              :precision="2"
              style="width: 150px"
            ></el-input-number>
            <el-button type="primary" size="mini" round>%</el-button>
            <!-- <el-button type="primary" size="mini" round>确定</el-button> -->
          </el-form-item>
          <div
            v-if="
              form.isUpgrade == '1' &&
              (form.sendUnitType === '4' || form.sendUnitType === '5')
            "
          >
            <el-form-item label="推送升级标题" v-if="!isImgShow">
              <el-input
                v-model="form.upgradeTitle"
                placeholder="请输入推送升级标题"
                :disabled="getDisabled(isTrue)"
                maxlength="20"
                show-word-limit
              ></el-input>
            </el-form-item>
            <el-form-item
              label="推送升级内容"
              v-if="!contentShow"
              style="position: relative"
            >
              <el-input
                type="textarea"
                v-model="form.upgradeContent"
                placeholder="请输入要推送的内容"
                :disabled="getDisabled(isTrue)"
                maxlength="200"
                show-word-limit
              ></el-input>
              <el-button
                type="success"
                v-if="pushlevelShow"
                size="mini"
                class="ShengImgas"
                @click="imgsShengBtn()"
                >查看升级图片</el-button
              >
            </el-form-item>
            <el-form-item v-if="!imageShengShow">
              <div v-if="this.imagesShengType === '4'">
                <img
                  src="http://134.64.251.212:8084/cpcp/imgUrl/four.png"
                  alt=""
                />
              </div>
              <div v-if="this.imagesShengType === '5'">
                <img
                  src="http://134.64.251.212:8084/cpcp/imgUrl/five.png"
                  alt=""
                />
              </div>
            </el-form-item>
          </div>
          <!-- 自定义文本推送 -使用 -->
          <el-form-item label="推送图片" v-if="!tinymceisImgShow">
            <el-upload
              ref="upload"
              :action="imgAction"
              list-type="picture-card"
              :file-list="fileList"
              name="images"
              :on-preview="handlePictureCardPreview"
              :on-remove="handleRemove"
              :on-success="handleSuccess"
              :limit="10"
              :on-exceed="handleExceed"
            >
              <i class="el-icon-plus"></i>
            </el-upload>
          </el-form-item>
          <!-- 自定义群组推送 使用 -->
          <el-form-item label="推送图片" v-if="!qzwbtsShow">
            <el-upload
              ref="upload"
              :action="imgAction"
              list-type="picture-card"
              :file-list="fileList"
              name="images"
              :on-preview="handlePictureCardPreview"
              :on-remove="handleRemove"
              :on-success="handleSuccess"
              :limit="10"
              :on-exceed="handleExceed"
            >
              <i class="el-icon-plus"></i>
            </el-upload>
          </el-form-item>
          <!-- 企业微信场景 使用 -->
          <el-form-item label="推送图片" v-if="qywxShow">
            <el-upload
              ref="upload"
              :action="weComeimgAction"
              list-type="picture-card"
              :file-list="fileList"
              name="images"
              :on-preview="handlePictureCardPreviewWeCome"
              :on-remove="handleRemoveWeCome"
              :on-success="handleSuccessWeCome"
              :limit="1"
              :on-exceed="handleExceedWeCome"
              :data="weComeForm"
            >
              <i class="el-icon-plus"></i>
            </el-upload>
          </el-form-item>
          <el-form-item label="推送附件" v-if="!tinymceisImgShow">
            <el-upload
              :action="fileAction"
              class="upload-demo"
              ref="fileAction"
              name="images"
              :limit="10"
              :show-file-list="true"
              :on-preview="handlePreviewFile"
              :onError="uploadErrorFile"
              :on-success="uploadSuccessFile"
              :on-exceed="handleExceedFile"
              :on-remove="beforeRemoveFile"
              :auto-upload="true"
              :file-list="fileListFile"
            >
              <!-- style="margin-left: 10px"  -->
              <el-button type="success">上传附件</el-button>
              <span style="color: #fff"
                >温馨提示：单次上传文件不能超过100M！</span
              >
            </el-upload>
          </el-form-item>

          <el-form-item label="业务场景推送预览" v-if="yulanImgShow">
            <div class="choice_btn">
              <div v-show="imgMumOne">
                <el-button
                  type="primary"
                  @click="choiceImg(1)"
                  class="buttonClass"
                  >自定义文本推送</el-button
                >
              </div>
              <div v-show="imgMumThere">
                <el-button
                  type="button_there"
                  @click="choiceImg(3)"
                  class="buttonClass"
                  >异动预警</el-button
                >
              </div>
            </div>
          </el-form-item>
          <el-form-item label="回执页面配置" v-if="yulanImgShow">
            <div class="choice_btn">
              <el-input v-model="htmlTemp" placeholder="" disabled></el-input>
              <el-button
                type="primary"
                @click="choiceReceipt"
                class="buttonClass"
                >选择</el-button
              >
              <el-button type="info" @click="choiceEmpty" class="buttonClass"
                >清空</el-button
              >
            </div>
          </el-form-item>
          <!-- <el-form-item label="推送文本" v-if="!tinymceisImgShow">
          <el-upload
            drag
            accept=".pdf, .doc, .docx, .xls, .xlsx"
            class="upload-demo"
            ref="uploadIcon"
            :limit="limitNum"
            :auto-upload="false"
            :action="fileAction"
            :on-exceed="exceedFile"
            :on-change="fileChange"
            :on-remove="handleRemoveFile"
            :on-preview="handlePreviewFile"
            :on-success="handleSuccessIcon"
            :on-error="handleErrorIcon"
            :file-list="fileListFile"
            :data="iconFileDataFile"
          >
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">
              将文件拖到此处，或<em>点击上传</em>
            </div>
          </el-upload>
          <el-button
            size="small"
            type="primary"
            @click="IcuoUploadFile"
            style="margin-left: 140px"
            >确认提交</el-button
          >
        </el-form-item> -->
          <div style="display: flex" v-if="qzwbtsShow">
            <el-form-item label="推送方式" v-if="!qywxShow">
              <el-select
                v-model="form.mode"
                placeholder="请选择推送方式"
                @change="handleChangepushMode()"
                style="width: 300px"
              >
                <el-option label="推送升级" value="1"></el-option>
                <el-option label="普通推送" value="0"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="推送方式" v-if="qywxShow">
              <el-select
                v-model="form.mode"
                placeholder="请选择推送方式"
                style="width: 300px"
              >
                <!-- <el-option label="推送升级" value="1"></el-option> -->
                <el-option label="普通推送" value="0"></el-option>
              </el-select>
            </el-form-item>
            <!-- <el-form-item label="推送方式" v-if="form.checkedCities.split(',')[1] == '盯存量无协议维系完成及预激励'">
              <el-select
                v-model="form.mode"
                placeholder="请选择推送方式"
                @change="handleChangepushMode()"
                style="width: 300px"
              >
                <el-option label="推送升级" value="1"></el-option>
                <el-option label="普通推送" value="0"></el-option>
              </el-select>
            </el-form-item> -->
            <el-form-item label="推送时间">
              <el-radio-group
                v-model="pushTimeType"
                @change="handleChangepushType()"
              >
                <el-radio :label="1">立即推送</el-radio>
                <!-- <el-radio :label="0" v-if="form.titleval !== '异动预警,' && form.titleName !== '异动预警'">定时发送</el-radio> -->
                <el-radio :label="0">定时发送</el-radio>
              </el-radio-group>
              <!-- <el-date-picker v-if="isTimeShow"
                            v-model="form.timeVal"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            type="datetime"
                            :picker-options="pickerOptions1"
                            placeholder="选择日期时间">
            </el-date-picker> -->
            </el-form-item>
            <!-- <el-form-item
            label="推送周期"
            v-if="isCycle && this.form.titleval !== '异动预警,'"
          > -->
            <el-form-item label="推送周期" v-if="isCycle">
              <el-select
                v-model="cycle"
                placeholder="请选择推送周期"
                style="width: 150px"
                @change="handleCycle()"
              >
                <el-option
                  :label="item.dictName"
                  v-for="item in cycleList"
                  :key="item.id"
                  :value="item.id"
                ></el-option>
              </el-select>
              <el-time-picker
                v-if="isTimeShow"
                style="width: 120px"
                v-model="form.timeVal"
                :picker-options="{
                  start: '00:00',
                  step: '00:15',
                  end: '23:59',
                }"
                format="HH:mm"
                value-format="HH:mm"
                placeholder="选择时间"
              >
              </el-time-picker>
              <el-date-picker
                v-if="isDateTimeShow"
                v-model="form.timeVal"
                type="datetime"
                :picker-options="pickerOptions1"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择日期时间"
              >
              </el-date-picker>
              <!-- <el-date-picker v-if="isDateTimeShow"
                            v-model="form.timeVal"
                            value-format="yyyy-MM-dd HH:mm:ss"
                            type="datetime"
                            :picker-options="pickerOptions1"
                            placeholder="选择日期时间">
            </el-date-picker> -->
            </el-form-item>
          </div>
          <el-form-item label="推送人号码" v-if="qywxShow">
            <el-input type="textarea" v-model="form.wecomUser"></el-input>
          </el-form-item>
          <el-form-item label="升级推送类型" v-if="sendUpTypeShow">
            <el-select
              v-model="form.sendUpType"
              placeholder="请选择升级推送类型"
              @change="choicePushTupe()"
            >
              <el-option label="iwork+短信" value="0"></el-option>
              <el-option label="iwork+外呼" value="1"></el-option>
              <el-option label="iwork+短信+外呼" value="2"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="智能语音外呼提醒内容" v-if="msgShow">
            <el-input
              type="textarea"
              style="width: 100%"
              :rows="2"
              placeholder="请输入内容"
              v-model="msg"
            >
            </el-input>
          </el-form-item>
          <div v-if="whetherShow">
            <el-form-item label="是否升级对象">
              <el-radio v-model="form.whether" label="1" @change="choiceLable"
                >是</el-radio
              >
              <el-radio v-model="form.whether" label="2" @change="choiceLable"
                >否</el-radio
              >
            </el-form-item>
          </div>
          <div v-if="togetherShow">
            <el-form-item label="是否同一批次">
              <el-radio
                v-model="form.isTogetherFlag"
                label="1"
                @change="choiceTogetherFlag"
                >是</el-radio
              >
              <el-radio
                v-model="form.isTogetherFlag"
                label="0"
                @change="choiceTogetherFlag"
                >否</el-radio
              >
            </el-form-item>
          </div>
          <div v-if="isObjectShow">
            <div style="display: flex">
              <el-form-item label="推送对象" v-if="qzwbtsShow">
                <!-- <el-form-item label="推送对象"> -->
                <!-- <el-button type="text"
                       @click="handleChangeGroup()">{{changeName}}</el-button> -->
                <el-button
                  type="text"
                  @click="handleChangelable(0, '选择主数据人员', 1)"
                  v-if="this.form.whether == '2'"
                  >选择主数据人员</el-button
                >
                <el-button
                  type="text"
                  @click="handleChangelable(0, '选择主数据群组', 2)"
                  v-if="this.form.whether == '2'"
                  >选择主数据群组</el-button
                >
                <el-button
                  type="text"
                  @click="handleChangelable(1, '选择Iwork群组', 3)"
                  v-if="this.form.whether == '2'"
                  >选择Iwork群组</el-button
                >
                <!-- 渠道视图--v-if="isTreeShow && this.form.whether == '2'" -->
                <el-button
                  type="text"
                  @click="handleChangelable(0, '渠道视图', 4)"
                  v-if="this.form.whether == '2'"
                  >选择渠道视图</el-button
                >
                <el-upload
                  v-if="isTreeShow && this.form.whether == '1'"
                  style="display: inline-block; line-height: 28px"
                  name="file"
                  ref="upload"
                  :multiple="true"
                  :show-file-list="false"
                  :onError="uploadError"
                  :onSuccess="uploadSuccess"
                  :action="actionUp"
                  :auto-upload="true"
                  :data="iconFileData"
                >
                  <el-button
                    style="margin: 0, 10px"
                    type="success"
                    @click="handleChangelable(0, 'EXCEL导入数据人员', 5)"
                    >EXCEL上传</el-button
                  >
                </el-upload>
                <!-- <el-button
                type="success"
                @click="handleChangelable(0, '渠道视图', 4)"
                
                >EXCEL导入</el-button
              > -->
                <el-button
                  type="info"
                  @click="downLoad"
                  v-if="isTreeShow && this.form.whether == '1'"
                  >推送模板下载</el-button
                >
                <el-button
                  type="primary"
                  @click="handleChangelable(0, '选择主数据人员', 5)"
                  v-if="isTreeShow && this.form.whether == '1'"
                  >选择主数据人员</el-button
                >
              </el-form-item>
            </div>
            <div style="display: flex">
              <el-form-item label="推送对象" v-if="!qzwbtsShow">
                <el-button
                  type="text"
                  @click="handleChangelable(1, '选择Iwork群组', 3)"
                  v-if="this.form.whether == '2'"
                  >选择Iwork群组</el-button
                >
              </el-form-item>
            </div>
            <el-form-item :label="lableNmaeInput" v-if="isRealy">
              <el-input
                type="textarea"
                style="width: 80%"
                :rows="2"
                :disabled="true"
                placeholder="请输入内容"
                v-model="personList"
              >
              </el-input>
            </el-form-item>
            <el-form-item
              label="已选渠道视图人员"
              v-if="isQudao && this.form.whether == '2'"
            >
              <el-input
                type="textarea"
                style="width: 80%"
                :rows="2"
                :disabled="true"
                placeholder="请输入内容"
                v-model="personListQudao"
              >
              </el-input>
            </el-form-item>
            <el-form-item
              label="升级人员"
              v-if="isTreeShow && this.form.whether == '1'"
            >
              <el-input
                type="textarea"
                style="width: 80%"
                :rows="2"
                :disabled="true"
                placeholder="请输入内容"
                v-model="shengjiList"
              >
              </el-input>
            </el-form-item>
            <el-form-item label="已选主数据群组" v-if="isPerson">
              <el-input
                :disabled="true"
                v-model="relaryLableName"
                style="width: 300px"
              >
              </el-input>
              <el-button @click="handleNoGroup()">清空</el-button>
            </el-form-item>
            <el-form-item label="已选Iwork群组" v-if="isIwork">
              <el-input
                :disabled="true"
                style="width: 300px"
                v-model="relaryGroupName"
              >
              </el-input>
              <el-button @click="handleIworkNoGroup()">清空</el-button>
            </el-form-item>
          </div>
        </div>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="close">取消</el-button>
        <el-button @click="handleSave" type="success">保存</el-button>
      </span>
    </el-dialog>
    <!-- 选择人弹框 -->
    <sendDialog
      ref="send"
      @fetchPersonId="fetchPersonId(arguments)"
    ></sendDialog>
    <!-- 选择人弹框-新的选人样式 -->
    <sendDialogTow
      ref="sendTow"
      @fetchPersonIdTow="fetchPersonIdTow(arguments)"
    ></sendDialogTow>
    <!-- 监控门店类型-渠道视图 -->
    <storeDialog
      ref="storeDialog"
      @fetchPersonId="getTreeMenDianData"
    ></storeDialog>
    <!-- 活动名称弹框 -->
    <activityDialog
      ref="activityDialog"
      @fetchPersonId="getTreeHuoDongData"
    ></activityDialog>
    <!-- 推送对象弹框 -->
    <pushPerson ref="pushPerson"></pushPerson>
    <!-- 查看图片 -->
    <el-dialog :visible.sync="isUploadImgShow" width="50%">
      <img width="100%" :src="dialogImageUrl" alt="" />
    </el-dialog>
    <!-- 选择群组 -->
    <el-dialog
      title="Iwork群组"
      :close-on-click-modal="false"
      :visible.sync="isGroupDialog"
      width="50%"
    >
      <div style="margin-bottom: 10px" class="mod-user">
        <el-form
          :inline="true"
          :model="iworkGroupFrom"
          class="demo-form-inline"
          @keyup.enter.native="onSubmitGroup()"
        >
          <el-button
            type="primary"
            @click="handLableIdIworkMores()"
            :disabled="multipleIworkSelection.length > 0 ? false : true"
            >批量选择</el-button
          >
          <el-input
            v-model="iworkGroupFrom.dictValue"
            placeholder="请输入Iwork群号码"
            style="width: 200px"
            clearable
          ></el-input>
          <el-input
            v-model="iworkGroupFrom.createName"
            placeholder="请输入创建人"
            style="width: 200px"
            clearable
          ></el-input>
          <el-button type="success" @click="handleIworkSearch()"
            >查询</el-button
          >
        </el-form>
      </div>
      <div>
        <el-table
          :data="groupList"
          border
          style="width: 100%"
          height="500"
          @selection-change="handleSelectionChangeIworkList"
        >
          <el-table-column type="selection" width="55"> </el-table-column>
          <el-table-column prop="dictName" label="Iwork群组名称" width="180">
          </el-table-column>
          <el-table-column prop="dictValue" label="Iwork群号码" width="">
          </el-table-column>
          <el-table-column prop="createName" label="创建人" width="">
          </el-table-column>
          <el-table-column prop="createTime" label="创建时间" width="">
          </el-table-column>
          <el-table-column
            label="操作"
            width="180"
            header-align="center"
            align="center"
          >
            <template slot-scope="scope">
              <el-button
                @click="
                  handleChangeGroupId(
                    scope.row.dictName + ',' + scope.row.dictValue
                  )
                "
                type="text"
                size="small"
                >选择</el-button
              >
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!-- <div style="text-align: center; margin: 80px 0">
        <el-select
          v-model="groupIdVal"
          style="width: 300px"
          placeholder="选择Iwork群组"
        >
          <el-option
            :label="item.dictName"
            :value="item.dictName + ',' + item.dictValue"
            v-for="(item, index) in groupList"
            :key="index"
          ></el-option>
        </el-select>
        <el-button type="primary" @click="handleChangeGroupId()"
          >确定</el-button
        >
      </div> -->
    </el-dialog>
    <!-- 选择标签-选择主数据群组 -->
    <el-dialog
      title="选择主数据群组"
      :close-on-click-modal="false"
      :visible.sync="isLableDialog"
      width="50%"
    >
      <div style="margin-bottom: 10px" class="mod-user">
        <el-form
          :inline="true"
          :model="dataFormGroup"
          class="demo-form-inline"
          @keyup.enter.native="onSubmitGroup()"
        >
          <!-- <el-form-item label="员工工号">
          <el-input
            v-model="dataForm.account"
            placeholder="请输入员工工号"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item label="员工姓名">
          <el-input
            v-model="dataForm.name"
            placeholder="请输入员工姓名"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">查询</el-button>
          <el-button type="primary" @click="onReset">重置</el-button>
        </el-form-item> -->
          <el-button
            type="primary"
            size="mini"
            @click="handLableIdMores()"
            :disabled="multipleSelection.length > 0 ? false : true"
            >批量选择</el-button
          >
        </el-form>
      </div>
      <div>
        <el-table
          :data="lableListData"
          border
          style="width: 100%"
          height="500"
          @selection-change="handleSelectionChangeList"
        >
          <el-table-column type="selection" width="55"> </el-table-column>
          <el-table-column prop="dictName" label="主数据群组名称" width="">
          </el-table-column>
          <el-table-column prop="count" label="人数" width="">
          </el-table-column>
          <el-table-column prop="createName" label="创建人" width="">
          </el-table-column>
          <el-table-column prop="createTime" label="创建时间" width="">
          </el-table-column>
          <el-table-column
            label="操作"
            width="180"
            header-align="center"
            align="center"
          >
            <template slot-scope="scope">
              <el-button
                @click="handLableId(scope.row.dictName + ',' + scope.row.id)"
                type="text"
                size="small"
                >选择</el-button
              >
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!-- <div style="text-align: center; margin: 80px 0">
        <el-select
          v-model="lableVal"
          placeholder="选择主数据群组"
          style="width: 300px"
        >
          <el-option
            :label="item.dictName"
            :value="item.dictName + ',' + item.id"
            v-for="(item, index) in lableList"
            :key="index"
          ></el-option>
        </el-select>
        <el-button type="primary" @click="handLableId()">确定</el-button>
      </div> -->
    </el-dialog>
    <!-- 选择活动弹框 -->
    <el-dialog
      title="选择活动"
      :close-on-click-modal="false"
      :visible.sync="isActDialog"
      width="60%"
    >
      <el-table
        :data="actImgTableData"
        stripe
        border
        style="width: 100%; margin-top: 10px"
      >
        <el-table-column
          prop="dictValue"
          align="center"
          width="120"
          label="场景编码 "
        >
        </el-table-column>
        <el-table-column prop="dictName" align="center" label="场景名称">
        </el-table-column>
        <el-table-column label="图片" align="center" width="160">
          <template slot-scope="scope">
            <img
              :src="fetchImg(scope.row.uploadPath)"
              alt=""
              v-if="scope.row.uploadPath"
              @click="handleLookImg(scope.row.uploadPath)"
              class="sm_img"
            />
          </template>
        </el-table-column>
        <el-table-column prop="name" align="center" label="操作 ">
          <template slot-scope="scope">
            <el-button
              @click="handleChangeActivte(scope.row)"
              type="text"
              size="small"
              >选择</el-button
            >
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <!-- 预览弹框 -->
    <el-dialog
      title="预览"
      :close-on-click-modal="false"
      :visible.sync="previewDialog"
      width="60%"
    >
      <div class="preview_img">
        <img :src="previewUrl" alt="活动" />
      </div>
    </el-dialog>
    <!-- 插入变量的弹框 原始的 -->
    <el-dialog
      title="选取推送变量"
      :close-on-click-modal="false"
      :visible.sync="bianliangShow"
      width="25%"
      class="tuiSong_dialog"
    >
      <div class="checkList_box">
        <div v-for="item in variableData" :key="item.colum">
          <el-checkbox-group v-model="checkList">
            <el-checkbox :label="item.colum">{{
              item.note + "--" + item.colum
            }}</el-checkbox>
          </el-checkbox-group>
          <!-- <el-checkbox v-model="item.colum">{{ item.note }}</el-checkbox> -->
        </div>
      </div>
      <div class="onSubmit_button">
        <el-button type="primary" @click="onSubmit">确定选择</el-button>
      </div>
    </el-dialog>
    <!-- 插入变量的弹框 芜湖的 -->
    <el-dialog
      title="选取推送变量"
      :close-on-click-modal="false"
      :visible.sync="bianliangShowWuHu"
      width="25%"
      class="tuiSong_dialog"
    >
      <div class="checkList_box">
        <div v-for="item in wuhuTable" :key="item.colum">
          <el-checkbox-group v-model="checkListWuHu">
            <el-checkbox :label="item.colum">{{
              item.note + "--" + item.colum
            }}</el-checkbox>
          </el-checkbox-group>
          <!-- <el-checkbox v-model="item.colum">{{ item.note }}</el-checkbox> -->
        </div>
      </div>
      <div class="onSubmit_button">
        <el-button type="primary" @click="onSubmitWuHU">确定选择</el-button>
      </div>
    </el-dialog>
    <!-- 插入变量的弹框-UIM卡运营数字化视图月报 -->
    <el-dialog
      title="选取推送变量"
      :close-on-click-modal="false"
      :visible.sync="bianliangShowTow"
      width="25%"
      class="tuiSong_dialog"
    >
      <div class="checkList_box">
        <div v-for="item in variableDataTow" :key="item.colum">
          <el-checkbox-group v-model="checkList">
            <el-checkbox :label="item.colum">{{
              item.note + "--" + item.colum
            }}</el-checkbox>
          </el-checkbox-group>
          <!-- <el-checkbox v-model="item.colum">{{ item.note }}</el-checkbox> -->
        </div>
      </div>
      <div class="onSubmit_button">
        <el-button type="primary" @click="onSubmit">确定选择</el-button>
      </div>
    </el-dialog>
    <!-- 新增和编辑页面 -->
    <!-- <inventoryAddorUpdate ref="inventoryAddorUpdate"></inventoryAddorUpdate> -->

    <!-- 业务场景推送预览 -弹框-->
    <el-dialog
      title="业务场景推送预览"
      :visible.sync="dialogChoiceImg"
      width="55%"
    >
      <div style="text-align: center">
        <img :src="imgUrl" alt="" />
      </div>
    </el-dialog>
    <!-- 回执页面配置选项 -->
    <el-dialog
      title="回执页面配置"
      :close-on-click-modal="false"
      :visible.sync="receiptDialog"
      width="50%"
    >
      <div style="margin-bottom: 10px" class="mod-user">
        <el-form
          :inline="true"
          class="demo-form-inline"
          @keyup.enter.native="onSubmitReceipt()"
        >
          <el-form-item>
            <el-input
              v-model="tempName"
              placeholder="请输入关键字搜索..."
              style="width: 200px"
              suffix-icon="el-icon-search"
            ></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div>
        <el-table :data="receiptList" border style="width: 100%" height="500">
          <el-table-column prop="tempName" label="双向交互页面名称" width="">
          </el-table-column>
          <!-- <el-table-column prop="tempName" label="预览图" width="">
          </el-table-column> -->
          <el-table-column
            prop=""
            header-align="center"
            align="center"
            label="预览图"
          >
            <template slot-scope="scope">
              <!-- <iframe id="mainIframe" style="width:100%;height:20%" name="mainIframe" src="http://134.64.251.212:8084/cpcp/htmlUrl/测试0530-3.html?imgUrls=http://134.64.251.212:8084/cpcp/htmlUrl/du_bg.png" frameborder="0" scrolling="auto"></iframe> -->
              <!-- src="http://134.64.251.212:8084/cpcp/htmlUrl/du_bg.png" -->
              <img
                :src="
                  scope.row.imgUrls === '' || scope.row.imgUrls === null
                    ? 'http://134.64.251.212:8084/cpcp/htmlUrl/du_bg.png'
                    : scope.row.imgUrls
                "
                alt=""
                srcset=""
                style="width: 20px; height: 20px"
                @click="ShowpreviewPic(scope.row)"
              />
            </template>
          </el-table-column>
          <el-table-column prop="createNo" label="编号" width="">
          </el-table-column>
          <el-table-column prop="createUserName" label="创建人" width="">
          </el-table-column>
          <el-table-column prop="createTime" label="创建时间" width="180">
          </el-table-column>
          <el-table-column
            label="操作"
            width="180"
            header-align="center"
            align="center"
          >
            <template slot-scope="scope">
              <el-button
                @click="handleReceipt(scope.row.id, scope.row.tempName)"
                type="text"
                size="small"
                >选择</el-button
              >
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-dialog>
    <!-- 图片预览   放在表格外面，这是个弹出框-->
    <el-dialog
      :visible.sync="lookdialogVisible"
      :modal="false"
      title="图片预览"
      width="25%"
    >
      <!-- <img src="../../../assets/courseImg/yulan.png" alt="" style="width:100%;height:100%" /> -->
      <!-- <img src="http://134.64.251.212:8084/cpcp/htmlUrl/测试0530-3.html?imgUrls=http://134.64.251.212:8084/cpcp/htmlUrl/du_bg.png" alt="" style="width:100%;height:100%" /> -->
      <div class="iframe_box">
        <!-- <iframe id="mainIframe" name="mainIframe" src="http://134.64.251.212:8084/cpcp/htmlUrl/%E6%B5%8B%E8%AF%950601-1.html?imgUrls=http://134.64.251.212:8084//cpcp/imgUrl/daoshanjiao.jpg" frameborder="0" ></iframe> -->
        <iframe
          id="mainIframe"
          name="mainIframe"
          :src="previewpic"
          frameborder="0"
        ></iframe>
      </div>
    </el-dialog>
    <!-- 芜湖数据展示 - 查看对应的几级照片-->
    <el-dialog
      :visible.sync="wuhuImgVisible"
      @close="closeDialog"
      :close-on-click-modal="false"
      :modal="false"
      title="数据预览"
      width="60%"
    >
      <img
        v-if="wuhuImg"
        :src="this.wuhuImg"
        alt=""
        style="width: 100%; height: 100%"
      />
      <!-- <img v-if="wuhuImg" src='../../../assets/courseImg/wuhuImg.png' alt="" style="width:100%;height:100%" /> -->
      <!-- <img v-if="wuhuImg" src='../../../assets/courseImg/wuhuImgT.png' alt="" style="width:100%;height:100%" /> -->
      <!-- <img v-if="wuhuImg" src='../../../assets/courseImg/wuhuImgF.png' alt="" style="width:100%;height:100%" /> -->
      <div v-else style="text-align: center; font-size: 20px">暂无图片</div>
    </el-dialog>
  </div>
</template>

<script>
import sendDialog from "../components/sendDialog copy";
import sendDialogTow from "../components/sendDialogTow";
import storeDialog from "../components/storeDialog copy";
import activityDialog from "../components/activityDialog";
import pushPerson from "./pushPerson.vue";
// import inventoryAddorUpdate from "./inventory-add-or-update";
import axios from "axios";
import img_1 from "../../../assets/img/01.png";
import img_2 from "../../../assets/img/02.png";
import img_3 from "../../../assets/img/03.png";
import img_4 from "../../../assets/img/04.png";
import tinymce from "tinymce/tinymce";
import Editor from "@tinymce/tinymce-vue";
import "tinymce/themes/silver/theme";
import "tinymce/plugins/colorpicker"; //选择颜色插件
import "tinymce/plugins/textcolor"; //文本颜色插件
import "tinymce/plugins/image";
import "tinymce/plugins/link";

//引入图标
import "tinymce/icons/default";
// 主要是解决打包到线上访问不到 static tinymce 下文件访问不到问题
const url = window.SITE_CONFIG.version ? "/" + window.SITE_CONFIG.version : "";
export default {
  data() {
    return {
      qzwbtsShow: true, //自定义群组推送，用来控制其他选项显隐
      wuhuCity: false, //页面只针对芜湖电信。
      wuhuList: [
        //芜湖 - 选择数据表
        {
          name: "",
          value: "",
        },
      ],
      lookdialogVisible: false,
      previewpic: "",
      receiptList: [], //回执页面配置数据
      tempName: "", //回执页面字段查询
      htmlTempId: null, //新增自定义场景添加html模版字段对应的id 带给后台
      htmlTemp: null, //新增自定义场景添加html模版字段 - 显示的值
      loadingTow: true,
      receiptDialog: false, //回执页面配置显隐
      yulanImgShow: false, //业务场景推送预览-按钮显隐
      dialogChoiceImg: false, //业务场景推送预览弹框显隐
      imgUrl: "", //照片地址
      imgMumOne: false, //自定义文本推送按钮
      imgMumThere: false, //异动预警按钮
      limitNum: 1,
      isDisbaled: false,
      isYdWarn: null, //编辑带回来的字段，用于判断那个编辑场景，和那个保存场景
      ydExpandId: "", //移动预警编辑使用字段
      action: "", //推送模板下载
      fileAction: "", //推送文件上传
      actionUp: "", //excel上传
      iconFileData: {
        //文件上传所需要的参数
        file: "",
      },
      iconFileDataFile: {
        //文件上传所需要的参数
        file: "",
      },
      uploadForm: {
        //execl上传后返回的数据
        batchId: "",
        pushNames: "",
        upgradeNames: "",
      },
      tinymceHtml: "",
      init: {
        language: "zh_CN", //语言
        //cpcp使用
        language_url: url + "/static/tinymce/zh_CN.js", //语言包的路径
        skin_url: url + "/static/tinymce/skins/ui/oxide",
        //content_css可设置编辑区内容展示的css，谨慎使用
        content_css: url + "/static/tinymce/skins/content/dark/content.css", //输入框的样式
        //企业微信使用
        // language_url: './'+url + "/static/tinymce/zh_CN.js", //语言包的路径
        // skin_url: './'+url + "/static/tinymce/skins/ui/oxide",
        // //content_css可设置编辑区内容展示的css，谨慎使用
        // content_css: './'+url + "/static/tinymce/skins/content/dark/content.css", //输入框的样式
        height: 300, //编辑器高度
        zindex: 100,
        plugins: "link image",
        toolbar:
          "'undo redo |  formatselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | image link | removeformat'",
        // images_upload_handler: (blobInfo, success, failure) => {
        // const img = 'data:image/jpeg;base64,' + blobInfo.base64()
        // success(img)
        // }
      },
      selectTreeData: {
        ssName: "", //选任人员组件带过来的名字
        ssCode: "", //选任人员组件带过来的工号
        actName: "", //活动名称组件带过来的名称
        actId: "", //活动名称组件带过来的活动id
      },
      dataList: [],
      triggerList: [], //触发类型下拉框数据
      dictValue: "",
      isChecked: 0,
      isAllCampaign: 0,
      treeHuongDongData: [], //活动名称选人保存的值，用于再次选择带回去值
      menDianTreeData: [], //监控门店类型选人保存的值，用于再次选择带回去值
      isTrue: true,
      pageNum: 1,
      pageSize: 10,
      total: 0,
      latnIdList: [],
      latnId: "", //当前登录人的地市code
      groupList: [],
      lableList: [], //主数据群组（首页下拉查询）
      lableListData: [], //主数据群组（表格展示）
      multipleSelection: [], //主数据多选数据
      multipleIworkSelection: [], //iwork数据多选数据
      dataFormGroup: {}, //主数据字段查询
      groupDictIds: "", //主数据群组多选的ids
      groupDictNams: "", //主数据群组多选的dictNames
      iworkDictIds: "", //iwork据群组多选的ids
      iworkDictNames: "", //iwork据群组多选的dictNames
      lableNmaeInput: "已选主数据人员",
      personList: "", //已选人员-主数据人员
      personListQudao: "", //已选人员-渠道视图人员
      shengjiList: "", //升级人员
      relaryGroupName: "", //已选iwork数据群组
      relaryLableName: "", //已选主数据群组
      titleList: [],
      qiyeList: [], //企业微信公司数据
      titleListN: [
        // { dictName: "异网营销", dictValue: "ydyj" },
        // { dictName: "融转单", dictValue: "rzt" },
      ],
      actTableData: [],
      actImgTableData: [],
      isOnlySceneData: [
        { label: "否", value: "0" },
        { label: "是", value: "1" },
      ],
      actVal: "",
      dialogVisible: false,
      id: null,
      previewUrl: "",
      previewDialog: false,
      bianliangShow: false, //原始的插入变量弹框
      bianliangShowWuHu: false, //芜湖 - 插入变量
      bianliangShowTow: false, //UIM卡运营数字化视图月报
      isActDialog: false,
      isAct: false,
      isImgShow: true,
      sceneCategoryShow: false, //场景类别下拉框显隐
      pushObjShow: false, //推送对象显隐
      pushObjName: "", //推送对象显示的是几级单元
      contentShow: true,
      imageShow: true,
      imageShengShow: true, //升级图片显隐
      tinymceisImgShow: true, //富文本编辑器显隐
      qywxShow: false, //企业微信场景使用显隐
      isGroupDialog: false,
      iworkGroupFrom: {
        dictValue: "", //Iwork群号码
        createName: "", //创建人
      },
      isLableDialog: false,
      isPerson: false, //已选主数据群组框
      isIwork: false, //已选Iwork群组
      isRealy: true, //已选主数据人员框显隐
      isQudao: false, //已选渠道视图框
      groupIdVal: "",
      lableVal: "",
      msg: "", //智能语音外呼提醒内容

      isCycle: true,
      sendUpTypeShow: false, //升级推送类型显隐
      cycle: "",
      isTimeShow: true,
      isDateTimeShow: false,
      isActShow: false,
      isObjectShow: false,
      isTreeShow: false, // 主要控制个性化触发场景的显示条件
      isTextShow: false,
      cycleList: [],
      imgAction: "", // 上传图片地址
      weComeimgAction: "", // 上传图片地址 - 企业微信使用
      weComeForm: {
        wecomCompany: "",
      },
      isUploadImgShow: false,
      fileList: [],
      fileListFile: [], //推送文件上传
      dialogImageUrl: "",
      changeName: "选择主数据人员",
      ids: [],
      dataForm: {
        sendType: "",
        masterValue: "",
        iworkValue: "",
        numVaue: "",
        nameValue: "",
        secenValue: "",
        isOnlyScene: "", //场景是否唯一
        staffValue: "",
      },
      pushTimeType: 1,
      // isTimeShow: true,
      form: {
        mode: "0",
        sendUpType: "0", //升级推送类型
        pattern: "0",
        company: "",
        isPush: true,
        checkedCities: "",
        imgOrTextVal: 1,
        timeVal: "",
        titleval: null,
        titlevalDictValue: "",
        activityLevelId: "", //异动预警使用,二级id
        activityLevelName: "", // 异动预警使用,二级name
        titleName: "",
        desc: "",
        groupId: "", //主数据人员
        iworkGroupId: "", //iwork数据人员
        groupName: "",
        lableName: "",
        lableId: "",
        // titleList: [],
        actSecenlist: [],
        actSecenVal: "",
        calledNum: 5,
        dabiaoNum: 5,
        checkedCitiesNum: "",
        whether: "2", //是否是升级对象
        isTogetherFlag: "0", //是否统一批次标识符 0：否 1：是
        isUpgrade: "0", //是否向上升级
        sendUnitType: "", //选取推送层级
        unitType: "", //点击插入变量时候传的参数
        filterType: "", //升级条件
        filterCondit: "", //判断条件
        threshold: 5, //触发条件
        threSymbol: "", //触发条件前面的符号
        upgradeTitle: "", //du升级人员标题
        upgradeContent: "", //du升级人员内容
        receipt: "", //回执页面信息
        tableName: "", //芜湖推送层级表
        whSendUnitType: null, //推送单元层级,芜湖选几级就对应是几
        whUnitType: null, //芜湖 - 点击数据展示时候传的参数
        wecomCompany: "", //公司应用名称
        wecomUser: "", //企业微信推送人员
        wecomImgUrl: "", //企业微信推 获取的附件URL
        wecomSendType:1,// 1:有内容无图片，2：无内容有图片，3：有图片有内容
      },
      pushlevelShow: false, //移动预警场景
      pushlevelShowTow: false, //UIM卡运营数字化场景
      pushlevelShowWuHu: false, //芜湖场景
      wuhuImg: "", //芜湖场景 - 看到的数据展示图片
      wuhuImgVisible: false, //芜湖 - 查看图片显隐
      pushLevel: [
        //选取推送层级
        {
          value: "2",
          label: "二级单元",
        },
        {
          value: "3",
          label: "三级单元",
        },
        {
          value: "4",
          label: "四级单元",
        },
        {
          value: "5",
          label: "五级单元",
        },
      ],
      upgradeData: [
        { label: "日维系成功率", value: "0" },
        { label: "日接触率", value: "1" },
        { label: "日离网率", value: "2" },
        { label: "月维系成功率", value: "3" },
        { label: "月接触率", value: "4" },
        { label: "月离网率", value: "5" },
        { label: "累计维系成功率", value: "6" },
        { label: "累计接触率", value: "7" },
        { label: "累计离网率", value: "8" },
      ], //升级条件
      triggerData: [
        { label: "<", value: "0" },
        { label: "<=", value: "1" },
        { label: ">", value: "2" },
        { label: ">=", value: "3" },
        { label: "=", value: "4" },
      ],
      imgsGroupTow: [
        {
          url: require("../../../assets/imtTow/zdywbts.png"),
          link: "/content1",
          indexImg: 1,
        },
        {
          url: require("../../../assets/imtTow/xszzdk.png"),
          link: "/content1",
          indexImg: 2,
        },
        {
          url: require("../../../assets/imtTow/ydyj.png"),
          link: "/content1",
          indexImg: 3,
        },
        {
          url: require("../../../assets/imtTow/gzzssd.png"),
          link: "/content1",
          indexImg: 4,
        },
        {
          url: require("../../../assets/imtTow/5Gldst.png"),
          link: "/content1",
          indexImg: 5,
        },
        {
          url: require("../../../assets/imtTow/kbxts.png"),
          link: "/content1",
          indexImg: 6,
        },
        {
          url: require("../../../assets/imtTow/bqxts.png"),
          link: "/content1",
          indexImg: 7,
        },
      ],
      threshold: [">", "=", "<", ">=", "<="], //阈值前面的>=<号
      variableData: [], //推送内容里面插入的变量 - 原来数据
      wuhuTable: [], // 推送内容里面插入的变量 - 芜湖数据
      variableDataTow: [], //UIM卡运营数字化视图月报
      checkList: [], //插入变量选中的值
      checkListWuHu: [], //插入变量选中的值 - 芜湖
      whetherShow: false, //是否是升级对象的显隐
      togetherShow: false, //是否同一批次显隐
      msgShow: false, //智能语音外呼提醒内容显隐
      upgradeShow: false, //是否向上升级的显隐
      imagesType: "0", //点击查看图片
      imagesShengType: "0", //点击查看升级图片
      pickerOptions1: {
        disabledDate(time) {
          return time.getTime() < Date.now() - 8.64e7;
        },
      },
      userType: null, // 保存是德类型 1：选择主数据人员 2：选择主数据群组， 3： 选择iwork群组 4：选择渠道视图 ，5：excel导入数据人员 ，6：移动预警标签
      sendStaffAccount: "", //人员sendStaffAccount
      blurIndex: null, // 光标位置
    };
  },
  computed: {
    cityCode: {
      get() {
        return this.$store.state.user.cityId;
      },
      set(val) {
        this.$store.commit("user/updateCityCode", val);
      },
    },
    staffAccount: {
      get() {
        return this.$store.state.user.staffAccount;
      },
      set(val) {
        this.$store.commit("user/updateStaffAccount", val);
      },
    },
    // lableList: {
    //   get () {
    //     return this.$store.state.type.du_user_tag
    //   }
    // },
    // titleList: {
    //   get () {
    //     return this.$store.state.type.du_text
    //   }
    // }
  },
  activated() {
    this.fetchGroupList();
    this.fetchCycleData();
    this.fetchTitleList();
    this.getQYList();
    this.fetchTitleListTow();
    this.fetchLableList(); //主数据群组数据
    this.fetchActSecen();
    this.fetchActData();
    this.getTriggerList();
    this.getImgSecenData();
    this.fetchTableList();
  },
  created() {
    this.imgAction = this.$http.adornUrl(
      `cpcpdu/uploadImg?token=${this.$cookie.get("token")}`
    );
    this.weComeimgAction = this.$http.adornUrl(
      `cpcpdu/getAccessImage?token=${this.$cookie.get("token")}`
    );
    this.fileAction = this.$http.adornUrl(
      `cpcpdu/uploadImg?token=${this.$cookie.get("token")}`
    );
    // alert(this.fileAction);
    // this.fetchTableList();
    this.action = this.$http.adornUrl(`staffConfig/downFile?type=1`);
    this.actionUp = this.$http.adornUrl(
      `staffConfig/importPushDate?token=${this.$cookie.get("token")}`
    );
    // alert(this.action)
    // this.fetchTitleList()
    // this.fetchLableList()
    // this.fetchActSecen()
    // this.getVariable();
  },
  components: {
    sendDialog,
    sendDialogTow,
    storeDialog,
    activityDialog,
    Editor,
    pushPerson,
    // inventoryAddorUpdate
  },
  watch: {
    dialogVisible(newVal, oldVal) {
      if (newVal === false) {
        this.msgShow = false;
        this.sendUpTypeShow = false;
        this.sceneCategoryShow = false;
        this.pushObjShow = false;
        this.qzwbtsShow = false;
        this.form.titlevalDictValue = "";
        this.isCycle = true; //推送周期的显隐
        this.qywxShow = false;
        this.relaryLableName = "";
        this.yulanImgShow = false;
        this.qzwbtsShow = true;
        this.wuhuCity = false;
        (this.isIwork = false), //已选Iwork群组
          console.log("--------------this.isIwork=", this.isIwork);
        this.isPerson = false; //已选主数据群组
        this.fetchGroupList();

        // 混合选取推送对象，保存成功后，会残留保存的数据，弹框消失后，清除上一次保存的数据
        this.personList = ""; //已选主数据人员
        this.personListQudao = ""; //已选渠道视图人员
        (this.groupDictIds = ""), //主数据群组多选的ids
          (this.groupDictNams = ""), //主数据群组多选的dictNames
          (this.sendStaffAccount = ""), //选择主数据人员-对应的工号
          (this.selectTreeData.ssCode = ""), //门店类型下的员工 逗号分割
          (this.form.groupId = ""), //主数据群组id
          (this.form.iworkGroupId = ""), //iwork群组id
          (this.form.groupName = ""), //iwork群组名字
          (this.form.wecomCompany = ""), //企业微信公司名字
          (this.form.wecomUser = ""), //企业微信推送人员
          (this.form.wecomImgUrl = ""), //企业微信推 获取的附件URL
          (this.lableVal = "");
        this.lableVal.split(",")[1] = "";
        this.lableVal.split(",")[0] = "";
        this.relaryGroupName = ""; //已选iwork数据群组
        this.form.tableName = "";
        this.form.isTogetherFlag = "0";
      }
      console.log("-------------", this.pushTimeType);
      if (this.pushTimeType === 1) {
        this.isCycle = false;
      }
    },
    isGroupDialog(newVal, oldVal) {
      if (newVal === false) {
        // this.fetchGroupList();
      }
    },
    receiptDialog(newVal, oldVal) {
      if (newVal === false) {
        this.tempName = "";
        this.getReceiptList();
      }
    },
    wuhuImgVisible(newVal, oldVal) {
      if (newVal === false) {
        this.wuhuImg = "";
      }
    },
  },
  mounted() {
    tinymce.init({});
  },
  methods: {
    handleExceed(file) {
      this.$message.error("最多上传10张图片");
    },
    handleSuccess(response, file, fileListFile) {
      console.log("response", response);
      console.log("wwwwwwwwwwwwwwww", file);
      console.log("fileListFile", fileListFile);
      if (response.code == 500) {
        this.$message.error(response.msg);
        this.$refs.upload.clearFiles(); //清除上传的附件，不显示在列表（）
        let index = 0;
        for (const i in fileListFile) {
          if (fileListFile[i] == file) {
            index = i;
            break;
          }
        }
        // 移出当前文件对象
        fileListFile.splice(index, 1);
      } else {
        this.$message.success("图片上传成功");
        let obj = {};
        obj.url = response.data;
        this.fileList.push(obj);
      }
      // let obj = {};
      // obj.url = file.data;
      // this.fileList.push(obj);
    },
    handleRemove(file, fileList) {
      console.log("file===", file);
      console.log("file===", fileList);
      let ss = file.url;
      let index = ss.lastIndexOf("/");
      let result = ss.substr(index + 1, ss.length);
      this.fileList = fileList.slice(-3);
      console.log("resultresultresult===", result);
      console.log("file===77777777777777777777", fileList);
    },
    handlePictureCardPreview(file) {
      this.isUploadImgShow = true;
      this.dialogImageUrl = file.url;
    },
    //企业微信上上传附件
    changeWeCome() {
      console.log("form.wecomCompany==", this.form.wecomCompany);
      this.weComeForm.wecomCompany = this.form.wecomCompany;
    },
    handleExceedWeCome(file) {
      this.$message.error("最多上传1张图片");
    },
    handleSuccessWeCome(response, file, fileListFile) {
      console.log("response", response);
      console.log("wwwwwwwwwwwwwwww", file);
      console.log("fileListFile", fileListFile);
      if (response.code == 500) {
        this.$message.error(response.msg);
        this.$refs.upload.clearFiles(); //清除上传的附件，不显示在列表（）
        let index = 0;
        for (const i in fileListFile) {
          if (fileListFile[i] == file) {
            index = i;
            break;
          }
        }
        // 移出当前文件对象
        fileListFile.splice(index, 1);
      } else {
        this.$message.success("图片上传成功");
        let obj = {};
        obj.url = response.data.imgUrl;
        this.form.wecomImgUrl = response.data.imgId;
        this.fileList.push(obj);
      }
      // let obj = {};
      // obj.url = file.data;
      // this.fileList.push(obj);
    },
    handleRemoveWeCome(file, fileList) {
      console.log("file===", file);
      console.log("file===", fileList);
      let ss = file.url;
      let index = ss.lastIndexOf("/");
      let result = ss.substr(index + 1, ss.length);
      this.fileList = fileList.slice(-3);
      console.log("resultresultresult===", result);
      console.log("file===77777777777777777777", fileList);
    },
    handlePictureCardPreviewWeCome(file) {
      this.isUploadImgShow = true;
      this.dialogImageUrl = file.url;
    },
    compositionstart(e) {},
    handleLookImg(url) {
      this.previewDialog = true;
      this.previewUrl = this.$http.adornUrl(url);
    },
    handleDelAct() {
      this.actVal = "";
      this.form.checkedCities = "";
      this.selectTreeData.ssName = "";
      this.selectTreeData.ssCode = "";
      this.selectTreeData.actId = "";
      this.selectTreeData.actName = "";
      this.isObjectShow = false;
    },
    handleChangeActivte(data) {
      this.form.checkedCities = `${data.dictValue},${data.dictName}`;
      this.actVal = data.dictName;
      this.handleActSecon();
      this.isActDialog = false;
    },
    fetchImg(url) {
      return this.$http.adornUrl(url);
    },
    // 选择活动
    handleChangeAct() {
      this.isActDialog = true;
      //   this.$http({
      //   url: this.$http.adornUrl("/cpcpscenerole/getSceneList"),
      //   method: "get",
      //   params: this.$http.adornParams({
      //     dictDataType: "send_activity",
      //   }),
      // }).then(res => {
      // })
    },

    //获取到监控门店类型树结构传过来的值
    getTreeMenDianData(data) {
      // this.menDianTreeData = menDianTreeData;
      console.log("----data", data);
      let list = data;
      // this.personList = "";
      this.personListQudao = "";
      let treeDatassCode = "";
      list.map((item) => {
        // this.personList += item.ssName + ",";
        this.personListQudao += item.ssName + ",";
        treeDatassCode += item.ssCode + ",";
      });
      this.selectTreeData.ssCode = treeDatassCode.substring(
        0,
        treeDatassCode.length - 1
      );
    },
    //获取到活动名称树结构传过来的值
    getTreeHuoDongData(treeHuongDongData, isAllCampaign) {
      if (isAllCampaign === false) {
        this.isAllCampaign = 0;
      } else {
        this.isAllCampaign = 1;
      }
      this.treeHuongDongData = treeHuongDongData;
      this.selectTreeData.actName = ""; //当选人后再继续选择时，这是要清除之前拼接的人员
      this.selectTreeData.actId = "";
      let treeHuongDongDataActid = "";
      this.treeHuongDongData.map((item) => {
        this.selectTreeData.actName += item.actName + ",";
        treeHuongDongDataActid += item.actId + ",";
        this.selectTreeData.actId = treeHuongDongDataActid.substring(
          0,
          treeHuongDongDataActid.length - 1
        );
      });
    },
    //活动名称弹框
    handleChangeActivity() {
      this.$nextTick(() => {
        this.$refs.activityDialog.init(
          this.id,
          this.treeHuongDongData,
          this.isAllCampaign
        );
      });
    },
    //触发类型下拉框
    getTriggerList() {
      this.loading = true;
      this.$http({
        url: this.$http.adornUrl(`sysdictdata/list`),
        method: "get",
        params: this.$http.adornParams({
          page: 1,
          limit: 10,
          dictType: "du_standard_type",
        }),
      }).then(({ data }) => {
        if (data.code === 0) {
          this.triggerList = data.page.list;
        }
      });
    },
    choiceDictType(dictValue) {
      this.dictValue = dictValue;
    },
    // 获取搜索条件下拉场景数据
    fetchActData() {
      this.$http({
        url: this.$http.adornUrl("/sysdictdata/getList"),
        method: "get",
        params: this.$http.adornParams({
          dictType: "send_activity",
          isShow: 1,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.actTableData = data.list;
        }
      });
    },
    // 获取图片场景数据
    getImgSecenData() {
      this.$http({
        url: this.$http.adornUrl("/sysdictdata/getImgSceneList"),
        method: "get",
        params: this.$http.adornParams({
          dictType: "send_activity",
          isShow: 1,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.actImgTableData = data.list;
        }
      });
    },
    // 开启或者关闭
    handleOpenOrClose(id, status) {
      let title = status === 1 ? "开启" : "关闭";
      this.$confirm(`您确定要${title}吗`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$http({
            url: this.$http.adornUrl("cpcpdu/openOrClose"),
            method: "post",
            data: this.$http.adornData({
              id: id,
              status: status,
            }),
          }).then(({ data }) => {
            if (data && data.code === 0) {
              this.$message({
                message: "操作成功",
                type: "success",
              });
              this.fetchTableList();
            } else {
              this.$message.error(data.msg);
            }
          });
        })
        .catch(() => {});
    },
    getSendObject(item) {
      let str = "";
      if (item.sendGroup == 1) {
        str = item.groupName;
        // console.log("============", str);
      } else {
        // if (null != item.labelName) {
        if (null != item.labelName && "" != item.labelName) {
          str = item.labelName;
        } else {
          str = "个人";
        }
      }
      // console.log("============",str);
      // console.log("============",str.length);
      return str.length > 10 ? str.substring(0, 10) + "..." : str;
      // return str;
    },
    handleActSecon() {
      //控制编辑时候回显的页面先隐
      let val = this.form.checkedCities.split(",");
      this.contentShow = false;
      if (val[0] === "hdcf" || val[0] === "hdsx") {
        this.isActShow = true;
      } else {
        this.isActShow = false;
        this.form.actSecenVal = "";
      }
      if (val[0] === "cswbts") {
        this.whetherShow = true; //点击编辑的时候：是否升级对象的显示
        this.tinymceisImgShow = false;
        this.contentShow = true;
      } else {
        this.tinymceisImgShow = true;
      }
      if (val[0] === "qywx") {
        this.contentShow = true;
      }
      // val[0] === "qzwbts"
      if (
        val[0] === "hdcf" ||
        val[0] === "xs_bqzd" ||
        val[0] === "yh_bqzd" ||
        val[0] === "xs_kb" ||
        val[0] === "xs_kbzd" ||
        val[0] === "yh_kbzd" ||
        val[0] === "5G_hj" ||
        val[0] === "cswbts" ||
        val[0] === "gxh_scene" ||
        val[0] === "uim" ||
        val[0] === "qzwbts"
      ) {
        this.isObjectShow = true;
      } else {
        this.isObjectShow = false;
      }
      this.form.checkedCitiesNum = val[0];
    },
    // 获取活动差分场景
    fetchActSecen() {
      this.$http({
        url: this.$http.adornUrl("generator/cpcpsplit/getActivitySplitList/"),
        method: "get",
        params: this.$http.adornParams({}),
      }).then(({ data }) => {
        {
          if (data && data.code === 0) {
            this.actSecenlist = data.list;
          }
        }
      });
    },
    // 主数据群组人员回显
    fetchAgainGroupData(sysDictDataId) {
      this.$http({
        url: this.$http.adornUrl("/staffsysdictdata/getStaffList"),
        method: "get",
        params: this.$http.adornParams({
          sysDictDataId: sysDictDataId,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          let list = [];
          let listTow = [];
          console.log("------------", data.list);
          if (data.list) {
            data.list.map((item) => {
              list.push(item.staffName);
              listTow.push(item.staffNameNew);
            });
          }
          this.personList = list.toString();
          this.shengjiList = listTow.toString();
        }
      });
    },
    handleCycle() {
      console.log("this.cycle", this.cycle);
      if (this.cycle == "17") {
        this.isTimeShow = true;
        this.isDateTimeShow = false;
      } else {
        this.form.timeVal = "";
        this.getTime();
        this.isTimeShow = false;
        this.isDateTimeShow = true;
      }
    },
    fetchCycleData() {
      this.$http({
        url: this.$http.adornUrl("/sysdictdata/list"),
        method: "get",
        params: this.$http.adornParams({
          dictType: "send_time_type",
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.cycleList = data.page.list;
          this.cycle = this.cycleList[0].id;
        }
      });
    },
    handleNoGroup() {
      this.lableVal = "";
      // this.personList = "";
      this.relaryLableName = "";
    },
    handleIworkNoGroup() {
      this.groupIdVal = "";
      // this.personList = "";
      this.relaryGroupName = "";
      this.form.iworkGroupId = "";
      this.form.groupName = "";
    },
    handleChangelable(val, name, userType) {
      this.form.pattern = val;
      this.userType = userType;
      console.log("this.userType==", this.userType);
      console.log("namenamename==", name);
      console.log("this.personList", this.personList);
      this.changeName = name;
      if (name === "选择主数据人员" && this.form.whether === "2") {
        console.log("name", name);
        console.log("-----------11111111111111111", this.form.whether);
        // return
        this.$refs.send.init("选择主数据人员", this.id, this.form.groupId);
      }
      if (name === "选择主数据人员" && this.form.whether === "1") {
        console.log("name", name);
        console.log("-----------222222222222222222222", this.form.whether);
        // return
        this.$refs.sendTow.init("选择主数据人员", this.id, this.form.groupId);
      }
      if (name === "选择主数据群组") {
        this.isLableDialog = true;
        this.getUserLog();
      }
      if (name === "选择Iwork群组") {
        this.isGroupDialog = true;
      }
      if (name === "渠道视图") {
        this.$refs.storeDialog.init(name, this.id, this.menDianTreeData);
      }
      this.handleActIsShow();
    },
    //多选(主数据群组)
    handleSelectionChangeList(val) {
      this.multipleSelection = val;
      console.log("主数据多选", this.multipleSelection);
      // let groupObj = {}
      let ids = "";
      let dictNames = "";
      this.multipleSelection.forEach((element) => {
        // console.log("dictNamedictName==",element.dictName);
        // console.log("ididid==",element.id);
        ids += element.id + ",";
        dictNames += element.dictName + ",";
      });
      console.log("ids====", ids);
      console.log("dictNames====", dictNames);
      this.groupDictIds = ids.substring(0, ids.length - 1);
      this.groupDictNams = dictNames.substring(0, dictNames.length - 1);
      console.log("this.groupDictIdsthis.groupDictIds==", this.groupDictIds);
      console.log("this.groupDictNams.groupDictNams==", this.groupDictNams);
    },
    //批量选择（主数据群组）
    handLableIdMores() {
      this.lableVal = "";
      this.form.lableName = this.groupDictNams;
      this.form.lableId = this.groupDictIds;
      this.relaryLableName = this.groupDictNams;
      this.isLableDialog = false;
      // this.fetchAgainGroupData(this.groupDictIds);
      console.log("------", this.personList);
    },
    //iwork数据选择按钮
    handleChangeGroupId(obj) {
      console.log("obj-----", obj);
      this.groupIdVal = obj;
      console.log("this.groupIdVal====", this.groupIdVal);
      // return
      let con = this.groupIdVal.split(",");
      // this.form.groupId = con[1];
      this.form.iworkGroupId = con[1];
      this.form.groupName = con[0];
      this.relaryGroupName = con[0];
      this.isGroupDialog = false;
    },
    //多选（iwork群组）
    handleSelectionChangeIworkList(val) {
      this.multipleIworkSelection = val;
      console.log("iwork多选", this.multipleIworkSelection);

      let iworkIds = "";
      let iworkNames = "";
      this.multipleIworkSelection.forEach((element) => {
        // console.log("dictNamedictName==",element.dictName);
        // console.log("ididid==",element.id);
        // iworkIds += element.id + ",";
        iworkIds += element.dictValue + ",";
        iworkNames += element.dictName + ",";
      });
      console.log("iworkIds====", iworkIds);
      console.log("iworkNames====", iworkNames);
      this.iworkDictIds = iworkIds.substring(0, iworkIds.length - 1);
      this.iworkDictNames = iworkNames.substring(0, iworkNames.length - 1);
      console.log("this.iworkDictIds.iworkDictIds==", this.iworkDictIds);
      console.log("this.iworkDictNames.iworkDictNames==", this.iworkDictNames);
    },
    //批量选择（iwork群组）
    handLableIdIworkMores() {
      this.groupIdVal = "";
      this.form.groupName = this.iworkDictNames;
      // this.form.groupId = this.iworkDictIds;
      this.form.iworkGroupId = this.iworkDictIds;
      this.relaryGroupName = this.iworkDictNames;
      this.isGroupDialog = false;
    },
    //点击查询
    onSubmitGroup() {
      this.pageIndex = 1;
      this.getUserLog();
    },
    //回执页面字段查询-回车事假
    onSubmitReceipt() {
      console.log("tempName=", this.tempName);
      this.getReceiptList();
    },
    // 选择标签
    handLableId(obj) {
      console.log("obj-----", obj);
      this.lableVal = obj;
      console.log("this.lableVal====", this.lableVal);
      // return
      let con = this.lableVal.split(",");
      console.log("----------", con);
      // return
      this.form.lableName = "";
      this.form.lableId = "";
      this.form.relaryLableName = "";
      this.form.lableName = con[0];
      this.form.lableId = con[1];
      this.relaryLableName = con[0];
      this.isLableDialog = false;
      // this.fetchAgainGroupData(con[1]);
    },
    //格式化小数点
    handleInput(value) {
      if (value != "") {
        if (value.indexOf(".") > -1) {
          this.recoveryAmount = value.substring(0, value.indexOf("."));
        } else {
          this.recoveryAmount = value;
        }
        // this.form.calledNum=this.recoveryAmount
      }
    },
    handleInput2(value) {
      console.log("-----", value);
      if (value != "") {
        if (value.indexOf(".") > -1) {
          this.form.threshold = value.substring(0, value.indexOf("."));
        } else {
          this.form.threshold = value;
        }
        // this.form.calledNum=this.recoveryAmount
      }
      console.log("===========", this.form.threshold);
    },
    //主数据群组数据（之前的下拉框）
    fetchLableList() {
      this.$http({
        url: this.$http.adornUrl("sysdictdata/list"),
        method: "get",
        params: this.$http.adornParams({
          dictType: "du_user_tag",
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.lableList = data.page.list;
        }
      });
    },
    //主数据群组数据（现在的表格数据）
    getUserLog() {
      this.$http({
        url: this.$http.adornUrl("sysdictdata/getUserLog"),
        method: "get",
        params: this.$http.adornParams({}),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          console.log("data.data=====", data);
          this.lableListData = data.page.list;
        }
      });
    },
    changeTitleCon() {
      console.log("this.form.titleval==", this.form.titleval);
      (this.fileList = []), //清空其他场景上传的附件
        console.log("上传的附件", this.fileList);
      (this.lableNmaeInput = "已选主数据人员"),
        (this.isIwork = false), //已选Iwork群组
        (this.isPerson = false); //已选主数据群组
      this.pushTimeType = 1;
      this.imgMumOne = false;
      this.imgMumThere = false;
      if (this.pushTimeType === 1) {
        this.isCycle = false;
      }
      const titleOrContent = this.form.titleval.split(",");
      console.log("titleOrContent==", titleOrContent);
      this.form.tableName = "";
      //选择异动预警-疑似异网营销的时候，推送周期只显示'日'
      // if (titleOrContent[0] === "异动预警-疑似异网营销") {
      if (titleOrContent[0] === "异动预警") {
        let object = this.cycleList.find((item) => {
          return item.dictName === "日";
        });
        this.isYdWarn = 1; //编辑的时候，场景改为异动预警
        console.log(object);
        this.cycle = object.id;
        this.cycleList = [];
        this.cycleList.push(object);
        console.log("-----", this.cycleList);
      } else {
        console.log("123456");
        this.isYdWarn = 0; //编辑的时候，场景改为异动预警
        this.fetchCycleData();
      }
      console.log("titleOrContent", titleOrContent);
      if (titleOrContent[0] === "异动预警") {
        this.yulanImgShow = true;
        this.sceneCategoryShow = true;
        this.imgMumThere = true;
      } else {
        this.sceneCategoryShow = false;
        this.yulanImgShow = false;
        this.imgMumThere = false;
      }
      (this.form.sendUnitType = ""), //每次切换推送场景，sendUnitType为空，这个值来判断升级条件等的显隐
        (this.form.whether = "2"); //每次选取推送场景时候，让这个值=2，目的是，对应的场景显示出推送对象，当选择自定义文本推送时候，是否升级对象显示为否，推送对象上传和导出功能隐藏
      this.form.unitType = ""; //每次选取推送场景时候，这个值来判断选取的推送层级，每次都默认不选择
      this.form.titleName = titleOrContent[0];
      this.form.desc = titleOrContent[1];
      this.isActShow = false;
      this.form.actSecenVal = "";
      this.isObjectShow = false;
      this.whetherShow = false;
      this.togetherShow = true;
      this.pushObjShow = false;
      this.wuhuCity = false;
      console.log("form.mode=", this.form.mode);
      console.log("form.mode=", typeof this.form.mode);
      console.log("form.mode=", this.form.mode);
      if (this.form.mode === "1") {
        this.sendUpTypeShow = true;
      }

      // this.msgShow = false;
      (this.msg = ""), //切换场景的时候，智能语音外呼提醒内容清空
        (this.upgradeShow = false);
      this.isTreeShow = false;
      this.isTextShow = false;
      this.contentShow = false;
      this.imageShow = true;
      this.imageShengShow = true;
      this.pushlevelShow = false;
      this.pushlevelShowTow = false;
      this.pushlevelShowWuHu = false;
      this.tinymceisImgShow = true;
      this.qywxShow = false; //富文本编辑器等显隐 - 企业微信使用
      this.qzwbtsShow = true;
      this.isQudao = true;
      this.isRealy = true;
      this.fileListFile = []; //切换场景的时候,推送的文本问空
      switch (titleOrContent[0]) {
        case "活动上线":
          this.form.checkedCities = `hdsx,盯${titleOrContent[0]}`;
          this.isActShow = true;
          break;
        case "活动执行":
          this.form.checkedCities = `hdzx,盯${titleOrContent[0]}`;
          break;
        case "活动转换":
          this.form.checkedCities = `hdzh,盯${titleOrContent[0]}`;
          break;
        case "快电数字化":
          this.form.checkedCities = `kd_szh,盯${titleOrContent[0]}`;
          break;
        case "自定义文本推送":
          this.form.checkedCities = `cswbts,盯${titleOrContent[0]}`;
          this.isTreeShow = true;
          this.isObjectShow = true;
          this.tinymceisImgShow = false;
          this.contentShow = true;
          this.whetherShow = true;
          this.yulanImgShow = true;
          this.imgMumOne = true;
          console.log("-222222222222222222", this.cycleList);
          break;
        case "“一站一营销”5G精准提升":
          this.form.checkedCities = `5G_yzyyx,盯${titleOrContent[0]}`;
          // this.isActShow = true
          // this.isObjectShow = true
          break;
        case "5G运营十大场景攻坚-换机":
          this.form.checkedCities = `5G_hj,盯${titleOrContent[0]}`;
          // this.isActShow = true
          this.isObjectShow = true;
          break;
        case "活动拆分":
          this.form.checkedCities = `hdcf,盯${titleOrContent[0]}`;
          // this.isActShow = true;
          this.isObjectShow = true;
          break;
        case "大融合-极致融合":
          this.form.checkedCities = `drh_jzrh,盯${titleOrContent[0]}`;
          break;
        case "个性化触发场景":
          this.form.checkedCities = `gxh_scene,盯${titleOrContent[0]}`;
          this.isTreeShow = true;
          this.isTextShow = true;
          this.isObjectShow = true;
          break;
        // case "异动预警-疑似异网营销":
        case "异动预警":
          this.form.checkedCities = `ydyj,盯${titleOrContent[0]}`;
          this.pushlevelShow = true;
          this.userType = "6";
          break;
        case "UIM卡运营数字化":
          this.form.checkedCities = `uim,盯${titleOrContent[0]}`;
          console.log("----------", this.form.checkedCities);
          this.form.titleName = "UIM卡运营数字化视图月报";
          console.log("this.form.desc==", this.form.desc);
          this.form.desc = "";
          console.log("this.form.desc333333333333333333==", this.form.desc);
          this.pushlevelShowTow = true;
          this.isObjectShow = true;
          this.isTreeShow = true;
          // this.form.whether == '2'
          break;
        case "自定义群组推送":
          this.form.checkedCities = `qzwbts,盯${titleOrContent[0]}`;
          console.log("----------", this.form.checkedCities);
          this.form.titleName = "自定义群组推送";
          console.log("this.form.desc==", this.form.desc);
          this.form.desc = "";
          console.log("this.form.desc333333333333333333==", this.form.desc);
          this.pushlevelShowTow = false;
          // this.tinymceisImgShow = false;
          this.isObjectShow = true;
          this.isTreeShow = true;
          this.qzwbtsShow = false;
          this.isQudao = false;
          this.isRealy = false;
          this.isImgShow = false;
          this.sendUpTypeShow = false; //升级推送类型
          // this.form.whether == '2'
          break;
        case "存量无协议维系完成及预激励":
          this.form.checkedCities = `wh_clwxy,盯${titleOrContent[0]}`;
          console.log("----------", this.form.checkedCities);
          this.wuhuCity = true;
          this.pushlevelShowWuHu = true;
          this.msgShow = false;
          this.sendUpTypeShow = false;
          this.form.mode = "0";
          break;
        case "营销大模型会议纪要":
          this.form.checkedCities = `yxdmx,盯${titleOrContent[0]}`;
          this.isTreeShow = true;
          this.isObjectShow = true;
          this.tinymceisImgShow = false;
          this.qywxShow = false; //富文本编辑器等显隐 - 企业微信使用
          this.contentShow = true;
          this.whetherShow = true;
          this.yulanImgShow = true;
          this.imgMumOne = true;
          console.log("-222222222222222222", this.cycleList);
          break;
        case "企业微信推送":
          this.form.checkedCities = `qywx,盯${titleOrContent[0]}`;
          (this.form.mode = "0"), //默认普通推送
            (this.togetherShow = false); //是否同一批次
          this.isTreeShow = true;
          this.isObjectShow = false; //推送对象
          this.tinymceisImgShow = true; //富文本编辑器等显隐 - 其他场景使用
          this.qywxShow = true; //富文本编辑器等显隐 - 企业微信使用
          this.contentShow = true;
          this.whetherShow = false; //是否升级对象
          this.yulanImgShow = false; //业务场景推送预览
          this.imgMumOne = true;
          this.sendUpTypeShow = false; //升级推送类型
          this.msgShow = false; //智能语音外呼提醒内容
          console.log("-222222222222222222", this.cycleList);
          break;
      }
      if (
        this.form.checkedCities.split(",")[0] === "kd_szh" ||
        this.form.checkedCities.split(",")[0] === "gxh_scene"
      ) {
        this.form.calledNum = 5;
      }
      if (this.form.checkedCities.split(",")[0] === "ydyj") {
        this.latnId = this.cityCode;
      } else {
        this.latnId = "";
      }
    },
    // 芜湖 - 选择数据表事件
    changeTitleConWuHu() {
      console.log("form.tableName=", this.form.tableName);
      this.getWuHuBianliang(this.form.tableName);
      if (this.form.tableName == "cpcp_tb_zj_clwx_3j_qd") {
        this.form.whSendUnitType = 3;
        // this.form.desc = "存量无协议维系完成及预激励";
        // this.form.desc = "${三级单元}昨日无协议维系${维系完成量}户，预计佣金${预计总佣金}元；2、三级单元下营业部的汇总清单";
        this.form.desc =
          "三级单元${mkt_area_name}昨日${day_id}无协议维系维系完成量${cnt_fz}户，预计总佣金${sum_yjcj}元";
        this.whUnitType = 3;
      } else if (this.form.tableName == "cpcp_tb_zj_clwx_4j_qd") {
        this.form.whSendUnitType = 4;
        // this.form.desc = "存量无协议维系完成及预激励";
        // this.form.desc = "${营业部}昨日无协议维系${维系完成量}户，预计佣金${预计总佣金}元；2、营业部下包区的汇总清单";
        this.form.desc =
          "四级单元${dept_name}昨日${day_id}无协议维系维系完成量${cnt_fz}户，预计总佣金${sum_yjcj}元";
        this.whUnitType = 4;
      } else if (this.form.tableName == "cpcp_tb_zj_clwx_2j_qd") {
        this.form.whSendUnitType = 2;
        // this.form.desc =
        //   "二级内容：2023年8月16日，芜湖市存量无协议维系完成~户，预计佣金~元";
        this.form.desc =
          "二级内容：日期${day_id}，芜湖市存量无协议维系完成三级总户数${sum_cnt_fz}户，预计佣金三级总佣金${sum_yjcj3j}元";
        this.whUnitType = 2;
      } else {
        this.form.whSendUnitType = 5;
        // this.form.desc = "存量无协议维系完成及预激励";
        // this.form.desc = "${包区}昨日无协议维系${维系完成量}户，预计佣金${预计总佣金}元";
        this.form.desc =
          "包区${duty_zone_name}昨日${day_id}无协议维系维系完成量${cnt_fz}户，预计总佣金${sum_yjcj}元";
        this.whUnitType = 5;
      }
      console.log("form.whSendUnitType=", this.form.whSendUnitType);
    },
    //根据选择数据表的表名获取 - 插入变量数据
    getWuHuBianliang(tableName) {
      this.$http({
        url: this.$http.adornUrl("/CpcpTbZjClwx3jQd/getColum"),
        method: "get",
        params: this.$http.adornParams({
          tableName: tableName,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          console.log("data", data.data);
          this.wuhuTable = data.data;
        } else {
          this.$message.error(data.msg);
          this.wuhuTable = [];
        }
      });
    },
    //选取场景类别——点击选项
    changeChoice() {
      console.log("titlevalDictValue=", this.form.titlevalDictValue);
      //dictName: "异网营销", dictValue: "ydyj"
      let obj = {};
      obj = this.titleListN.find((item) => {
        return item.dictValue === this.form.titlevalDictValue;
      });
      console.log("--------------", obj);
      this.form.activityLevelId = obj.dictValue;
      this.form.activityLevelName = obj.dictName;
    },
    //点击推送层级
    changeUnitType() {
      console.log("this.form.sendUnitType", this.form.sendUnitType);
      console.log("this.form.sendUnitType", typeof this.form.sendUnitType);
      switch (this.form.sendUnitType) {
        case "2":
          this.pushObjName = "二级单元";
          break;
        case "3":
          this.pushObjName = "三级单元";
          break;
        case "4":
          this.pushObjName = "四级单元";
          break;
        case "5":
          this.pushObjName = "五级单元";
          break;

        default:
          this.pushObjName = "";
          break;
      }
      if (this.form.sendUnitType === null) {
        this.form.unitType = "";
      } else {
        this.form.unitType = this.form.sendUnitType;
      }
      this.pushObjShow = true;
      // this.getVariable();
      console.log(this.form.unitType);
      this.form.isUpgrade = "0"; //是否升级对象 0：否，1：是
      this.form.filterType = ""; //升级条件
      this.form.filterCondit = ""; //触发条件
      this.form.desc = ""; //推送内容（插入变量）
      // console.log("this.form.sendUnitType===",this.form.sendUnitType);
      if (this.form.sendUnitType === "4" || this.form.sendUnitType === "5") {
        this.upgradeShow = true;
      } else {
        this.upgradeShow = false;
      }
      // if (this.form.sendUnitType === "2" || this.form.sendUnitType === "3") {
      //   this.form.threshold = "";
      // } else {
      //   this.form.threshold = "5";
      // }
      console.log("是否向上升级", this.form.isUpgrade);
      console.log("是否向上升级", typeof this.form.isUpgrade);

      if (this.form.isUpgrade === "0") {
        console.log("11111");
        this.form.threshold = "";
      } else {
        console.log("2222");
        this.form.threshold = "5";
      }
      console.log("----", this.form.threshold);
      // console.log("24534534634", this.form.threshold);
      // console.log("24534534634", this.form.isUpgrade);
    },
    //点击推送对象-几级单元
    pushButton() {
      console.log("this", this.cityCode);
      console.log("pushObjName", this.form.sendUnitType);
      let data = {};
      data.latnId = this.cityCode;
      data.unitType = this.form.sendUnitType;
      console.log("data===", data);
      this.$nextTick(() => {
        this.$refs.pushPerson.hanlleSearch(data);
      });
    },
    //点击是否向上升级
    changeRadio(value) {
      // console.log("1111",value);
      // console.log("1111",typeof value);
      if (value === "" || value === "0") {
        this.form.threshold = "";
      } else {
        this.form.threshold = "5";
      }
      console.log("----this.form.threshold=", this.form.threshold);
    },
    //判断推送内容禁止状态
    getDisabled(isTrue) {
      let flag = isTrue;
      console.log("flag===", flag);
      console.log("this.form.checkedCities==", this.form.checkedCities);
      // this.form.checkedCities.split(",")[0] === "qzwbts"
      if (
        this.form.checkedCities.split(",")[0] === "cswbts" ||
        this.form.checkedCities.split(",")[0] === "gxh_scene" ||
        this.form.checkedCities.split(",")[0] === "ydyj" ||
        this.form.checkedCities.split(",")[0] === "uim" ||
        this.form.checkedCities.split(",")[0] === "qzwbts" ||
        this.form.checkedCities.split(",")[0] === "wh_clwxy"
      ) {
        flag = false;
      } else {
        flag = true;
      }
      return flag;
    },

    // 获取群组列表(iwork群组数据，下拉框数据)
    fetchGroupList() {
      this.$http({
        // url: this.$http.adornUrl("sysdictdata/listByUser"),
        url: this.$http.adornUrl("sysdictdata/getnewPage"),
        method: "get",
        params: this.$http.adornParams({
          pageSize: 9000,
          pageNum: 1,
          latnId: this.cityCode,
          dictValue: this.iworkGroupFrom.dictValue,
          createName: this.iworkGroupFrom.createName,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.groupList = data.data.records;
        } else {
          this.$message.error(data.msg);
          this.groupList = [];
        }
      });
    },
    //查询 - 获取群组列表(iwork群组数据，下拉框数据)
    handleIworkSearch() {
      this.fetchGroupList();
    },
    //  字典获取值
    fetchTitleList() {
      this.$http({
        url: this.$http.adornUrl("/sysdictdata/list"),
        method: "get",
        params: this.$http.adornParams({
          dictType: "du_text",
          // dictType: "ydyj",
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.titleList = data.page.list;
        }
      });
    },
    //获取企业微信的公司数据
    getQYList() {
      this.$http({
        url: this.$http.adornUrl("/wecomConfig/searchList"),
        method: "get",
        params: this.$http.adornParams({
          pageNum: 1,
          pageSize: 100,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          setTimeout(() => {
            this.qiyeList = data.data.records;
          }, 1000);
        } else {
          this.$message.error(res.data.msg);
          this.qiyeList = [];
        }
        // this.dataListLoading = false
      });
    },
    //  字典获取值
    fetchTitleListTow() {
      this.$http({
        url: this.$http.adornUrl("/sysdictdata/list"),
        method: "get",
        params: this.$http.adornParams({
          // dictType: "du_text",
          dictType: "ydyj",
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.titleListN = data.page.list;
        }
      });
    },
    // 弹框直接推送
    handleNowpush(id) {
      let ids = [id];
      this.$http({
        url: this.$http.adornUrl("/cpcpdu/sendOneMessage"),
        method: "post",
        data: this.$http.adornData(ids, false),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.$message({
            message: "推送成功",
            type: "success",
          });
          this.fetchTableList();
        } else {
          console.log("qqqqqqqqqqqqqqqqqqqqqqqqqqq");
          this.$message.error(data.msg);
        }
      });
    },
    // 确定推送
    handlePushPerson(id) {
      let ids = [id];
      this.$confirm(`您确定要推送吗`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$http({
            url: this.$http.adornUrl("/cpcpdu/sendOneMessage"),
            method: "post",
            data: this.$http.adornData(ids, false),
          }).then(({ data }) => {
            if (data && data.code === 0) {
              this.$message({
                message: "推送成功",
                type: "success",
              });
              this.fetchTableList();
            } else {
              console.log("1111111111");
              this.$message.error(data.msg);
            }
          });
        })
        .catch(() => {});
    },
    //  获取子组件人员id(主数据人员选择带来的数据)
    fetchPersonId(params) {
      console.log("11111111111", params);
      let r_staffId = [];
      let q_orgId = [];
      let r_staffAccount = [];
      let q_staffAccount = [];
      let r_staffName = [];
      let q_staffName = [];
      let r_staffIdNew = [];
      let q_orgIdNew = [];
      let r_staffAccountNew = []; //升级人员工号
      let q_staffAccountNew = [];
      let r_staffNameNew = []; //升级人员姓名
      let q_staffNameNew = [];
      if (params[0]) {
        params[0].map((item) => {
          r_staffId.push(item.staffId);
          r_staffAccount.push(item.staffAccount);
          r_staffName.push(item.staffName);
          r_staffNameNew.push(item.staffNameNew);
          r_staffAccountNew.push(item.staffAccountNew);
        });
      }
      if (params[1]) {
        params[1].map((item) => {
          q_orgId.push(item.orgId);
          q_staffAccount.push(item.orgId);
          q_staffName.push(item.orgName);
          q_staffNameNew.push(item.staffNameNew);
        });
      }
      this.sendStaffAccount = r_staffAccount.toString() + "#" + q_staffAccount;
      this.form.groupId = r_staffId.toString() + "#" + q_orgId.toString();
      this.personList = [...r_staffName, ...q_staffName].toString();
      console.log("------------,this.personList===", this.personList);
      // this.userType = 5
      // this.shengjiList = [...r_staffNameNew, ...q_staffNameNew].toString();
      this.shengjiList = [...r_staffNameNew, ...q_staffName].toString();
      // if (val.length > 0) {
      //   let list = [];
      //   let person = [];
      //   let sendStaffAccount = []
      //   val.map((item) => {
      //     list.push(item.staffId);
      //     person.push(item.staffName);
      //     sendStaffAccount.push(item.staffAccount)
      //   });
      //   this.sendStaffAccount = sendStaffAccount.toString();
      //   this.form.groupId = list.toString();
      //   this.personList = person.toString();
      // } else {
      //   this.personList = "";
      // }
    },
    //  获取子组件人员id--新的弹框数据
    fetchPersonIdTow(params) {
      console.log("22222222", params);
      console.log("22222222", params[2]);
      // groupId
      let r_staffId = [];
      let q_orgId = [];
      let r_staffAccount = [];
      let q_staffAccount = [];
      let r_staffName = [];
      let q_staffName = [];
      let r_staffIdNew = [];
      let q_orgIdNew = [];
      let r_staffAccountNew = []; //升级人员工号
      let q_staffAccountNew = [];
      let r_staffNameNew = []; //升级人员姓名
      let q_staffNameNew = [];
      if (params[0]) {
        params[0].map((item) => {
          r_staffId.push(item.staffId);
          r_staffAccount.push(item.pushAcc);
          r_staffName.push(item.pushName);
          r_staffNameNew.push(item.upgradeName);
          r_staffAccountNew.push(item.upgradeAcc);
        });
      }
      if (params[1]) {
        params[1].map((item) => {
          q_orgId.push(item.orgId);
          q_staffAccount.push(item.orgId);
          q_staffName.push(item.orgName);
          q_staffNameNew.push(item.staffNameNew);
        });
      }
      this.sendStaffAccount = r_staffAccount.toString() + "#" + q_staffAccount;
      this.form.groupId = params[2];
      console.log("this.form.groupId===", this.form.groupId);
      this.personList = [...r_staffName, ...q_staffName].toString();
      // this.shengjiList = [...r_staffNameNew, ...q_staffNameNew].toString();
      this.shengjiList = [...r_staffNameNew, ...q_staffName].toString();
      // if (val.length > 0) {
      //   let list = [];
      //   let person = [];
      //   let sendStaffAccount = []
      //   val.map((item) => {
      //     list.push(item.staffId);
      //     person.push(item.staffName);
      //     sendStaffAccount.push(item.staffAccount)
      //   });
      //   this.sendStaffAccount = sendStaffAccount.toString();
      //   this.form.groupId = list.toString();
      //   this.personList = person.toString();
      // } else {
      //   this.personList = "";
      // }
    },
    handleActIsShow(val) {
      console.log("val----", val);
      console.log("this.changeName=", this.changeName);
      // if (!val) {

      //   this.selectTreeData.ssCode = null;
      //   // this.sendStaffAccount = "";
      //   // this.form.groupId = null;
      //   this.form.groupName = "";
      //   // this.relaryGroupName = "";//之前是单个选择，在选择其他推送对象时候（主数据人员，渠道视图等），之前选的iwork群组数据清空，现在支持混合选择，这里就不清空了
      //   this.form.lableName = "";
      //   this.form.lableId = "";
      //   this.groupDictIds = ""
      //   this.groupDictNams = ""
      //   this.lableVal = "";
      //   // this.relaryLableName = "";//之前点击主数据群组回显，已选主数据群组是清空数据的
      //   // this.personList = "";//之前是单个选择，在选择其他推送对象时候（主数据人员，渠道视图等），之前选的主数据人员数据清空，现在支持混合选择，这里就不清空了
      //   this.groupIdVal = "";
      // }
      if (
        this.changeName === "选择主数据人员" ||
        this.changeName === "监控门店类型"
      ) {
        this.isRealy = true;
        this.isQudao = true;
        // this.isPerson = false;
        // this.isIwork = false;
      }
      if (this.changeName === "选择主数据群组") {
        this.isPerson = true;
        // this.isIwork = false;
        // this.isRealy = true;
      }
      if (this.changeName === "选择Iwork群组") {
        // this.isPerson = false;
        this.isIwork = true;
        // this.isRealy = false;
      }
    },
    handleResetAct() {
      if (this.form.pattern == 0) {
      } else {
        this.form.imgOrTextVal = 1;
        this.isImgShow = false;
        this.contentShow = false;
        // this.tinymceisImgShow = false;
        this.form.checkedCities = "";
      }
    },
    //  点击详情
    handleDetail(id) {
      this.$router.push({
        path: "/duDetails",
        query: {
          id,
        },
      });
    },
    //城市
    getIWorkCity(item) {
      let str = "";
      str += item.cityName;
      str += "</br>" + item.cityId + "";
      return str;
    },
    //推送人
    getIWorkState(item) {
      let str = "";

      // if (item.staffName) {
      // str += "item.staffAccount";
      str += item.staffAccount;
      str += "</br>" + item.staffName + "";
      // str = item.staffAccount + '&nbsp;&nbsp;'+"/" +'&nbsp;&nbsp;' + item.staffName ;
      // }

      return str;
    },
    //  选择推送对象
    handleChangeGroup() {
      if (this.form.pattern == 1) {
        this.isGroupDialog = true;
      } else {
        this.$refs.send.init("选择主数据人员", this.id, this.form.groupId);
      }
    },
    handleChangeImgOrText() {
      this.isActShow = false;
      this.isObjectShow = false;
      this.isTreeShow = false;
      this.isTextShow = false;
      this.whetherShow = false;
      // 是图片还是文本
      if (this.form.imgOrTextVal == 0) {
        this.isImgShow = true;
        this.contentShow = true;
        this.tinymceisImgShow = true;
        // 是图片的时候， 是活动拆分和活动上线的时候
        if (
          (this.form.checkedCities &&
            this.form.checkedCities.split(",")[0] === "hdcf") ||
          this.form.checkedCities.split(",")[0] === "hdsx"
        ) {
          this.isActShow = true;
        }
        // 是图片的时候，是活动上线的时候
        if (
          this.form.checkedCities &&
          this.form.checkedCities.split(",")[0] === "hdcf"
        ) {
          this.isObjectShow = true;
        } else {
          this.isObjectShow = false;
        }
      } else {
        this.isImgShow = false;
        this.contentShow = false;
        // this.tinymceisImgShow = false;
        // 是文本的时候， 是活动拆分和活动上线的时候
        if (
          (this.form.titleval &&
            this.form.titleval.split(",")[0] === "活动拆分") ||
          this.form.titleval.split(",")[0] === "活动上线"
        ) {
          this.isActShow = true;
        }
        // 是文本的时候，是活动上线的时候
        if (
          (this.form.titleval &&
            this.form.titleval.split(",")[0] === "活动拆分") ||
          this.form.titleval.split(",")[0] === "个性化触发场景"
        ) {
          this.isObjectShow = true;
        } else {
          this.isObjectShow = false;
        }
        // 是文本的时候，是分公司个性化场景的时候
        if (this.form.titleval.split(",")[0] === "个性化触发场景") {
          this.isTreeShow = true;
          this.isTextShow = true;
        }
        if (this.form.titleval.split(",")[0] === "自定义文本推送") {
          this.isTreeShow = true;
        }
        if (this.form.titleval.split(",")[0] === "UIM卡运营数字化视图月报") {
          console.log("1111111111111111111111111111");
          this.isTreeShow = true;
          this.isObjectShow = true;
        }
      }
    },
    //推送方式按钮
    handleChangepushMode() {
      console.log("---", this.form.mode);
      console.log("---", typeof this.form.mode);
      //之前是进来默认显示智能语音外呼提醒内容-现在在下面判断了-iwork+短信隐藏
      // this.form.mode === "1" ? (this.msgShow = true) : (this.msgShow = false);
      this.form.mode === "1"
        ? (this.sendUpTypeShow = true)
        : (this.sendUpTypeShow = false);
    },
    //选择升级推送类型
    choicePushTupe() {
      console.log("ssssssssssssssss");
      console.log("----------------", this.form.sendUpType);
      console.log("----------------", typeof this.form.sendUpType);
      if (this.form.sendUpType == "0") {
        this.msgShow = false;
      } else {
        this.msgShow = true;
      }
      // this.msgShow
    },
    //  切换推送方式()
    handleChangepushType() {
      console.log("111111");
      // this.pushTimeType === 0 ? (this.isCycle = true) : (this.isCycle = false);
      // console.log("---------", this.form.titleval);
      // console.log("---------", this.form.titleName);
      // console.log("pushTimeTypepushTimeType", this.pushTimeType);
      // console.log("pushTimeTypepushTimeType", typeof this.pushTimeType);
      // if(this.form.titleval === '异动预警,' && this.form.titleName === '异动预警'){
      // if(this.form.titleval === '异动预警,' && this.form.titleName === '异动预警'){
      //   this.isCycle = false //判断推送周期的显隐
      // }else{
      //   this.pushTimeType === 0 ? (this.isCycle = true) : (this.isCycle = false);
      //   console.log("哈哈哈");
      // }
      this.pushTimeType === 0 ? (this.isCycle = true) : (this.isCycle = false);
    },
    //点击取消
    close() {
      this.dialogVisible = false;
      this.form.calledNum = 5;
      this.form.dabiaoNum = 5;
      this.selectTreeData.ssName = "";
      this.selectTreeData.ssCode = "";
      this.selectTreeData.actId = "";
      this.selectTreeData.actName = "";
      this.uploadForm.upgradeNames = "";
      this.shengjiList = "";
      this.personList = "";
      this.personListQudao = "";
      this.form.whether = "2";
    },
    //弹出层右上角关闭
    closeDialog() {
      console.log("弹框关闭了");
      this.form.calledNum = 5;
      this.form.dabiaoNum = 5;
      this.selectTreeData.ssName = "";
      this.selectTreeData.ssCode = "";
      this.selectTreeData.actId = "";
      this.selectTreeData.actName = "";
      this.uploadForm.upgradeNames = "";
      this.shengjiList = "";
      this.personList = "";
      this.personListQudao = "";
      this.form.whether = "2";
      this.wuhuImg = "";
    },
    // 保存
    handleSave() {
      console.log("原始页面保存");
      if (this.id) {
        this.handleUpdateDic();
      } else {
        this.handleAddDic();
      }
    },
    // 获取推送图片的url
    getImgUrls() {
      let imgUrls = [];
      if (this.form.titleval.split(",")[0] === "自定义文本推送") {
        this.fileList.map((item) => {
          imgUrls.push(item.url);
          console.log("item.urlitem.urlitem.url=", item.url);
        });
      }
      if (this.form.titleval.split(",")[0] === "自定义群组推送") {
        this.fileList.map((item) => {
          imgUrls.push(item.url);
          console.log("item.urlitem.urlitem.url=", item.url);
        });
      }
      if (this.form.titleval.split(",")[0] === "营销大模型会议纪要") {
        this.fileList.map((item) => {
          imgUrls.push(item.url);
          console.log("item.urlitem.urlitem.url=", item.url);
        });
      }
      if (this.form.titleval.split(",")[0] === "企业微信推送") {
        this.fileList.map((item) => {
          imgUrls.push(item.url);
          console.log("item.urlitem.urlitem.url=", item.url);
        });
      }
      return imgUrls.toString();
    },
    //获取 wecomSendType 1:有内容无图片，2：无内容有图片，3：有内容有图片
    getwecomSendType(){
      //wecomSendType 1:有内容无图片，2：无内容有图片，3：有内容有图片
        if (this.form.desc.length > 0 && this.fileList.length == 0) {
          this.form.wecomSendType = 1;
        }else if (this.form.desc.length == 0 && this.fileList.length > 0) {
          this.form.wecomSendType = 2;
        }else if (this.form.desc.length > 0 && this.fileList.length > 0) {
          this.form.wecomSendType = 3;
        }
    },
    // 获取推送附件的url
    getEnclosureUrls() {
      let enclosureUrls = [];
      if (this.form.titleval.split(",")[0] === "自定义文本推送") {
        this.fileListFile.map((item) => {
          console.log("itemitemitemitem", item.url);
          enclosureUrls.push(item.url);
        });
      }
      return enclosureUrls.toString();
    },
    // 新增
    handleAddDic() {
      console.log("-------------", this.form.whether);
      this.getTime();
      // this.getImgUrls()
      // this.getEnclosureUrls()
      // console.log(this.form);
      // console.log("选取推送场景---------------", this.form.titleval);
      // console.log("选取推送层级",this.form.sendUnitType);
      // console.log("----------",typeof this.form.sendUnitType);
      // console.log("----------",typeof parseInt(this.form.sendUnitType));
      // console.log("是否向上升级", this.form.isUpgrade);
      // console.log("isUpgrade", typeof parseInt(this.form.isUpgrade));
      // console.log("升级条件",this.form.filterType);
      // console.log("升级条件",typeof parseInt(this.form.filterType));
      // console.log("----------",this.form.filterCondit);
      // console.log("触发条件",typeof parseInt(this.form.filterCondit));
      console.log("threshold", this.form.threshold / 100);
      console.log("阈值", typeof (this.form.threshold + ""));

      console.log("this.userType===", this.userType);
      console.log("this----------", this.latnId);
      if (this.form.upgradeTitle === "") {
        this.form.upgradeTitle = "升级标题";
      }
      if (this.form.upgradeContent === "") {
        this.form.upgradeContent = "升级内容";
      }
      if (this.form.isUpgrade === "0") {
        this.form.upgradeTitle = "";
        this.form.upgradeContent = "";
      }
      if (this.selectTreeData.actId === "undefined")
        this.selectTreeData.actId = "";
      if (this.selectTreeData.ssCode === "undefined")
        this.selectTreeData.ssCode = "";
      let activity =
        this.form.checkedCities != "" ? this.form.checkedCities.split(",") : "";
      // let leble = this.lableVal != "" ? this.lableVal.split(",") : ""; //之前主数据群组下拉框单选的的时候获取值
      console.log("this.lableValthis.lableValthis.lableVal==", this.lableVal);
      let labeldictName = ""; //names
      let labeldictIds = ""; //ids
      if (this.lableVal != "") {
        labeldictName = this.lableVal != "" ? this.lableVal.split(",")[0] : " ";
        labeldictIds = this.lableVal != "" ? this.lableVal.split(",")[1] : "";
      } else {
        labeldictName = this.groupDictNams;
        labeldictIds = this.groupDictIds;
      }
      //企业微信
      console.log("this.form.titleval===", this.form.titleName);
      if (this.form.titleName == "企业微信推送") {
        // alert("11111")
        if (this.form.wecomCompany === "" || this.form.wecomCompany === null) {
          this.$message.error("请选择企业微信推送公司");
          return;
        }
        console.log("this.form.desc==", this.form.desc);
        console.log("this.form.desc==", this.form.desc.length);
        console.log("this.fileList==", this.fileList);
        console.log("this.fileList==", this.fileList.length);
        this.getwecomSendType();
        //wecomSendType 1:有内容无图片，2：无内容有图片，3：有内容有图片
        // if (this.form.desc.length > 0 && this.fileList.length == 0) {
        //   this.form.wecomSendType = 1;
        // }else if (this.form.desc.length == 0 && this.fileList.length > 0) {
        //   this.form.wecomSendType = 2;
        // }else if (this.form.desc.length > 0 && this.fileList.length > 0) {
        //   this.form.wecomSendType = 3;
        // }
        console.log("this.form.wecomSendTyp===",this.form.wecomSendType);
      }
      console.log("wecomUser111111===", this.form.wecomUser);
      //去掉电话号码的空格，中文逗号
      this.form.wecomUser = this.form.wecomUser
        .replace(/，/g, ",")
        .replace(/ /g, "");
      console.log("wecomUser222222===", this.form.wecomUser);
      console.log("this.lableVal====", this.lableVal);
      console.log("groupDictNams====", this.groupDictNams);
      console.log("groupDictIds====", this.groupDictIds);
      console.log("labeldictName====", labeldictName);
      console.log("labeldictIds====", labeldictIds);
      console.log("activity====", activity);
      // console.log("leble====", leble);
      // if (this.form.titleval === "异动预警-疑似异网营销,") {
      if (this.form.titleval === "异动预警,") {
        console.log("dddddddddddddddddddddddddd");
        if (this.form.titleval === "" || this.form.titleval === null) {
          this.$message.error("请选取推送场景");
          return;
        }
        if (
          this.form.titlevalDictValue === "" ||
          this.form.titlevalDictValue === null
        ) {
          console.log("哈哈哈");
          this.$message.error("请选取场景类别");
          return;
        }
        console.log("选取推送场景---------------", this.form.titleval);
        console.log("选取推送场景---------------", typeof this.form.titleval);
        if (this.form.titleName === "" || this.form.titleName === null) {
          this.$message.error("请填写推送标题");
          return;
        }
        console.log("选取推送标题---------------", this.form.titleName);
        console.log("选取推送标题---------------", typeof this.form.titleName);
        if (this.form.sendUnitType === "" || this.form.sendUnitType === null) {
          this.$message.error("选取推送层级");
          return;
        }
        if (this.form.desc === "" || this.form.desc === null) {
          this.$message.error("请填写推送内容");
          return;
        }
        console.log("取推送层级====", this.form.sendUnitType);
        if (this.form.isUpgrade === "1") {
          console.log("---------------------------------------------");
          if (this.form.filterType === "") {
            this.$message.error("请选择升级条件");
            return;
          }
          console.log("请选择升级条件-------");
          if (this.form.filterCondit === "") {
            this.$message.error("请选择触发条件");
            return;
          }
          console.log("请选择触发条件-------");
          if (
            this.form.threshold === "" ||
            this.form.threshold === NaN ||
            this.form.threshold === undefined
          ) {
            this.$message.error("请填写阈值");
            return;
          }
          console.log("阈值-------", this.form.threshold);
          console.log("阈值-------", typeof this.form.threshold);
        } else {
          console.log("升级条件-------", this.form.filterType);
          console.log("升级条件-------", typeof this.form.filterType);
          console.log("触发条件-------", this.form.filterCondit);
          console.log("触发条件-------", typeof this.form.filterCondit);
          console.log("阈值-------", this.form.threshold / 100);
          console.log("阈值-------", typeof this.form.threshold / 100);
        }
      }
      // return;
      this.$http({
        url: this.$http.adornUrl("/cpcpdu/save"),
        method: "post",
        data: this.$http.adornData({
          content: this.form.desc,
          sendType: this.form.mode, //推送方式
          sendUpType: this.form.sendUpType, //升级推送类型
          sendTime: this.form.timeVal ? this.form.timeVal + ":00" : "",
          sendTimeType: this.cycle,
          sendGroup: this.form.pattern, //推送模式  0个人 1群组

          groupId: this.form.groupId, //主数据群组id
          iworkGroupId: this.form.iworkGroupId, //iwork群组id
          groupName: this.form.groupName, //iwork群组名字
          // labelId: leble[1], // 主数据群组回显 - 之前的参数
          // labelName: leble[0], // 主数据群组回显 - 之前的参数
          labelIds: labeldictIds, // 主数据群组回显
          labelName: labeldictName, // 主数据群组回显

          pattern: this.form.imgOrTextVal,
          activityId: activity[0],
          activityName: activity[1],
          title: this.form.titleName,
          isTiming: this.pushTimeType,
          activitySplitId: this.form.actSecenVal,
          calledNum: this.form.calledNum || "",
          storyStaffAccounts: this.selectTreeData.ssCode, //门店类型下的员工 逗号分割
          // isAllStaff: this.isChecked, //是否全选 1是0否
          isAllCampaign: this.isAllCampaign, //是否全选 1是0否
          campaignIds: this.selectTreeData.actId, //活动类型Id 逗号分割 最多4个
          // calledNum: this.form.dabiaoNum, //（达标标准）
          triggerType: this.dictValue, //触发类型
          userType: this.userType,
          sendStaffAccounts: this.sendStaffAccount,
          imgUrls: this.getImgUrls(), // 获取图片数据
          fileUrls: this.getEnclosureUrls(), // 获取推送附件数据
          // 新加字段
          sendUnitType: parseInt(this.form.sendUnitType), //选取推送层级
          isUpgrade: parseInt(this.form.isUpgrade), //是否升级 0 否 1 是
          filterType: parseInt(this.form.filterType), //升级条件
          filterCondit: parseInt(this.form.filterCondit), //触发条件
          threshold: this.form.threshold + "", //阈值
          upgradeTitle: this.form.upgradeTitle, //du升级人员标题
          upgradeContent: this.form.upgradeContent, //du升级人员内容
          latnId: this.latnId, //当前登录人的地市code
          msg: this.msg, //智能语音外呼提醒内容
          //新增字段-异动预警使用,二级id 和  异动预警使用,二级name
          activityLevelId: this.form.activityLevelId,
          activityLevelName: this.form.activityLevelName,
          htmlTempId: this.htmlTempId, //新增自定义场景添加html模版字段
          // 芜湖场景新加字段
          whSendUnitType: this.form.whSendUnitType,
          tableName: this.form.tableName,
          //是否同一批次字段
          isTogetherFlag: this.form.isTogetherFlag,
          //企业微信字段
          wecomCompany: this.form.wecomCompany,
          wecomUser: this.form.wecomUser,
          wecomImgUrl: this.form.wecomImgUrl,
          wecomSendType:this.form.wecomSendType,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.$message({
            message: "添加成功",
            type: "success",
          });
          console.log("-----------------------", this.form.titleval);
          console.log("-----------------------", this.form.titleName);
          //新加判断-是否显示推送：当选择异动预警模块的时候，不需要弹出提示
          if (this.form.titleName === "自定义群组推送") {
          } else {
            if (this.pushTimeType == 1 && this.form.titleName !== "异动预警") {
              this.$confirm(`您确定立即推送吗`, "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
              })
                .then(() => {
                  this.handleNowpush(data.duId);
                  this.dialogVisible = false;
                })
                .catch(() => {
                  this.dialogVisible = false;
                });
            }
          }

          this.dialogVisible = false;
          this.fetchTableList();
          this.uploadForm.upgradeNames = "";
          this.shengjiList = "";
          // this.personList = "";
          // this.personListQudao = ""
          this.form.whether = "2";
          // this.groupDictIds = "",
          // this.groupDictNams = "",
          // this.sendStaffAccount = '',
          // this.selectTreeData.ssCode = '', //门店类型下的员工 逗号分割
          // this.form.groupId = "", //主数据群组id
          // this.form.iworkGroupId = '', //iwork群组id
          // this.form.groupName = '', //iwork群组名字
          // this.relaryGroupName = ''
          (labeldictIds = ""), // 主数据群组回显
            (labeldictName = ""); // 主数据群组回显
          this.groupDictIds = "";
          this.groupDictNams = "";
          this.lableVal.split(",")[1] = "";
          this.lableVal.split(",")[0] = "";
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    //获取当前时间（时分秒）
    getTime() {
      // var myDate = new Date();
      var date = new Date();
      var year = date.getFullYear();
      var month = date.getMonth() + 1;
      var day = date.getDate();
      let h = date.getHours();
      h = h < 10 ? "0" + h : h;
      let m = date.getMinutes();
      m = m < 10 ? "0" + m : m;
      let s = date.getSeconds();
      s = s < 10 ? "0" + s : s;
      month = month < 10 ? "0" + month : month;
      day = day < 10 ? "0" + day : day;
      let str = "";
      // str = year + "-" + month + "-" + day + " " + h + ":" + m + ":" + s
      str = h + ":" + m + ":" + s;
      console.log("strstr", str);
      // let str2 = ""
      return str;
    },
    insertWaihuLog(id) {
      this.$http({
        url: this.$http.adornUrl("/cpcplog/insertLog"),
        method: "post",
        params: this.$http.adornParams({
          id: id,
        }),
      }).then((res) => {
        if (res.data.code === 0) {
          this.$message({
            message: "调用成功",
            type: "success",
          });
          this.fetchTableList();
          this.dialogVisible = false;
        } else {
          console.log("3333333333333333");
          this.$message({
            showClose: true,
            message: data.msg,
            type: "error",
          });
        }
      });
    },
    // 修改
    handleUpdateDic() {
      console.log("this.isYdWarn", this.isYdWarn);
      console.log("this.id", this.id);
      console.log("this.ydExpandId", this.ydExpandId);

      // return
      if (this.isYdWarn === 0) {
        let activity =
          this.form.checkedCities != ""
            ? this.form.checkedCities.split(",")
            : "";
        // let leble = this.lableVal != "" ? this.lableVal.split(",") : "";
        let labeldictName = ""; //names
        let labeldictIds = ""; //ids
        if (this.lableVal != "") {
          console.log("=========", this.lableVal);
          // labeldictName = this.lableVal.split(",")[0];
          labeldictName = this.relaryLableName;
          // labeldictIds = this.lableVal.split(",")[0];
          // labeldictIds = this.lableVal;
          labeldictIds = this.form.lableId || this.lableVal;
          console.log("this.groupDictNams===", labeldictName);
          console.log("this.groupDictIds===", labeldictIds);
        } else {
          console.log("this.groupDictNams===", this.groupDictNams);
          console.log("this.groupDictIds===", this.groupDictIds);
          labeldictName = this.groupDictNams;
          // labeldictIds = this.groupDictIds;
          labeldictIds = this.groupDictIds;
        }
        // return
        this.$http({
          url: this.$http.adornUrl("/cpcpdu/update"),
          method: "post",
          data: this.$http.adornData({
            id: this.id,
            serviceType: "du_service",
            content: this.form.desc,
            sendType: this.form.mode, //推送方式
            sendUpType: this.form.sendUpType, //升级推送类型
            sendTime: this.form.timeVal ? this.form.timeVal + ":00" : "",
            sendTimeType: this.cycle,
            sendGroup: this.form.pattern, //推送模式
            groupName: this.form.groupName,
            groupId: this.form.groupId, //主数据群组id
            iworkGroupId: this.form.iworkGroupId, //iwork群组id
            // labelId: leble[1],
            // labelName: leble[0],
            labelIds: labeldictIds,
            labelName: labeldictName,
            pattern: this.form.imgOrTextVal,
            activityId: activity[0],
            activityName: activity[1],
            title: this.form.titleName,
            isTiming: this.pushTimeType,
            activitySplitId: this.form.actSecenVal,
            calledNum: this.form.calledNum || "",
            storyStaffAccounts: this.selectTreeData.ssCode, //门店类型下的员工 逗号分割
            // isAllStaff: this.isChecked, //是否全选 1是0否
            isAllCampaign: this.isAllCampaign, //是否全选 1是0否
            campaignIds: this.selectTreeData.actId, //活动类型Id 逗号分割 最多4个
            // calledNum: this.form.dabiaoNum, //（达标标准）
            triggerType: this.dictValue, //触发类型
            userType: this.userType,
            sendStaffAccounts: this.sendStaffAccount,
            imgUrls: this.getImgUrls(), // 获取图片数据
            fileUrls: this.getEnclosureUrls(), // 获取推送附件数据
            msg: this.msg,
            //企业微信字段
            wecomCompany: this.form.wecomCompany,
            wecomUser: this.form.wecomUser,
            wecomImgUrl: this.form.wecomImgUrl,
          }),
        }).then(({ data }) => {
          if (data && data.code === 0) {
            this.$message({
              message: "更新成功",
              type: "success",
            });
            //新加判断-是否显示推送：当选择异动预警模块的时候，不需要弹出提示
            if (this.pushTimeType == 1 && this.form.titleName !== "异动预警") {
              this.$confirm(`您确定立即推送吗`, "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
              })
                .then(() => {
                  this.handleNowpush(this.id);
                  this.dialogVisible = false;
                })
                .catch(() => {
                  this.dialogVisible = false;
                });
            }
            this.dialogVisible = false;
            this.fetchTableList();
            this.uploadForm.upgradeNames = "";
            (labeldictIds = ""), // 主数据群组回显
              (labeldictName = ""); // 主数据群组回显
            this.groupDictIds = "";
            this.groupDictNams = "";
            this.lableVal = "";
            this.shengjiList = "";
            this.personList = "";
            this.personListQudao = "";
            this.form.whether = "2";
          } else {
            console.log("555555555555555");
            this.$message({
              showClose: true,
              message: data.msg,
              type: "error",
            });
          }
        });
      } else {
        if (this.form.titleval === "" || this.form.titleval === null) {
          this.$message.error("请选取推送场景");
          return;
        }
        // console.log("选取推送场景---------------", this.form.titleval);
        // console.log("选取推送场景---------------", typeof this.form.titleval);
        if (this.form.titleName === "" || this.form.titleName === null) {
          this.$message.error("请填写推送标题");
          return;
        }
        // console.log("选取推送标题---------------", this.form.titleName);
        // console.log("选取推送标题---------------", typeof this.form.titleName);
        if (this.form.sendUnitType === "" || this.form.sendUnitType === null) {
          this.$message.error("请选取推送层级");
          return;
        }
        if (this.form.desc === "" || this.form.desc === null) {
          this.$message.error("请填写推送内容");
          return;
        }
        console.log("取推送层级====", this.form.sendUnitType);
        if (this.form.isUpgrade === "1") {
          console.log("---------------------------------------------");
          if (this.form.filterType === "") {
            this.$message.error("请选择升级条件");
            return;
          }
          console.log("请选择升级条件-------");
          if (this.form.filterCondit === "") {
            this.$message.error("请选择触发条件");
            return;
          }
          console.log("请选择触发条件-------");
          if (
            this.form.threshold === "" ||
            this.form.threshold === NaN ||
            this.form.threshold === undefined
          ) {
            this.$message.error("请填写阈值");
            return;
          }
          // console.log("阈值-------", this.form.threshold);
          // console.log("阈值-------", typeof this.form.threshold);
        } else {
          // console.log("升级条件-------", this.form.filterType);
          // console.log("升级条件-------", typeof this.form.filterType);
          // console.log("触发条件-------", this.form.filterCondit);
          // console.log("触发条件-------", typeof this.form.filterCondit);
          // console.log("阈值-------", this.form.threshold / 100);
          // console.log("阈值-------", typeof this.form.threshold / 100);
        }
        let activity =
          this.form.checkedCities != ""
            ? this.form.checkedCities.split(",")
            : "";
        // let leble = this.lableVal != "" ? this.lableVal.split(",") : "";
        let labeldictName = ""; //names
        let labeldictIds = ""; //ids
        if (this.lableVal != "") {
          console.log("=========", this.lableVal);
          // labeldictName = this.lableVal.split(",")[0];
          labeldictName = this.relaryLableName;
          // labeldictIds = this.lableVal.split(",")[0];
          // labeldictIds = this.lableVal;
          labeldictIds = this.form.lableId || this.lableVal;
          console.log("this.groupDictNams===", labeldictName);
          console.log("this.groupDictIds===", labeldictIds);
        } else {
          console.log("this.groupDictNams===", this.groupDictNams);
          console.log("this.groupDictIds===", this.groupDictIds);
          labeldictName = this.groupDictNams;
          labeldictIds = this.groupDictIds;
        }
        // return
        this.$http({
          url: this.$http.adornUrl("/ydExpand/updateYdScene"),
          method: "post",
          data: this.$http.adornData({
            duId: this.id,
            ydExpandId: this.ydExpandId,
            serviceType: "du_service",
            content: this.form.desc,
            sendType: this.form.mode, //推送方式
            sendUpType: this.form.sendUpType, //升级推送类型
            sendTime: this.form.timeVal ? this.form.timeVal + ":00" : "",
            sendTimeType: this.cycle,
            sendGroup: this.form.pattern, //推送模式
            groupName: this.form.groupName,
            groupId: this.form.groupId, //主数据群组id
            iworkGroupId: this.form.iworkGroupId, //iwork群组id
            // labelId: leble[1],
            // labelName: leble[0],
            labelIds: labeldictIds,
            labelName: labeldictName,
            pattern: this.form.imgOrTextVal,
            activityId: activity[0],
            activityName: activity[1],
            title: this.form.titleName,
            isTiming: this.pushTimeType,
            activitySplitId: this.form.actSecenVal,
            calledNum: this.form.calledNum || "",
            storyStaffAccounts: this.selectTreeData.ssCode, //门店类型下的员工 逗号分割
            // isAllStaff: this.isChecked, //是否全选 1是0否
            isAllCampaign: this.isAllCampaign, //是否全选 1是0否
            campaignIds: this.selectTreeData.actId, //活动类型Id 逗号分割 最多4个
            // calledNum: this.form.dabiaoNum, //（达标标准）
            triggerType: this.dictValue, //触发类型
            userType: this.userType,
            sendStaffAccounts: this.sendStaffAccount,
            imgUrls: this.getImgUrls(), // 获取图片数据
            fileUrls: this.getEnclosureUrls(), // 获取推送附件数据
            // 新加字段
            sendUnitType: parseInt(this.form.sendUnitType), //选取推送层级
            isUpgrade: parseInt(this.form.isUpgrade), //是否升级 0 否 1 是
            filterType: parseInt(this.form.filterType), //升级条件
            filterCondit: parseInt(this.form.filterCondit), //触发条件
            threshold: this.form.threshold + "", //阈值
            upgradeTitle: this.form.upgradeTitle, //du升级人员标题
            upgradeContent: this.form.upgradeContent, //du升级人员内容
            msg: this.msg,
            //企业微信字段
            wecomCompany: this.form.wecomCompany,
            wecomUser: this.form.wecomUser,
            wecomImgUrl: this.form.wecomImgUrl,
          }),
        }).then(({ data }) => {
          if (data && data.code === 0) {
            this.$message({
              message: "更新成功",
              type: "success",
            });
            //新加判断-是否显示推送：当选择异动预警模块的时候，不需要弹出提示
            if (this.pushTimeType == 1 && this.form.titleName !== "异动预警") {
              this.$confirm(`您确定立即推送吗`, "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
              })
                .then(() => {
                  this.handleNowpush(this.id);
                  this.dialogVisible = false;
                })
                .catch(() => {
                  this.dialogVisible = false;
                });
            }
            this.dialogVisible = false;
            this.fetchTableList();
            this.uploadForm.upgradeNames = "";
            (labeldictIds = ""), // 主数据群组回显
              (labeldictName = ""); // 主数据群组回显
            this.groupDictIds = "";
            this.groupDictNams = "";
            this.shengjiList = "";
            this.personList = "";
            this.personListQudao = "";
            this.form.whether = "2";
          } else {
            console.log("555555555555555");
            this.$message({
              showClose: true,
              message: data.msg,
              type: "error",
            });
          }
        });
      }
    },
    // 推送
    handlePush() {},
    //   新增
    handleAdd() {
      // this.$nextTick(() => {
      //   this.$refs.inventoryAddorUpdate.handleAdd();
      // });
      // this.$router.push({
      //   path: "/inventoryAddorUpdate",
      //   query: {
      //     // id,
      //   },
      // });

      this.isDisbaled = false;
      this.dialogVisible = true;
      this.sendUpTypeShow = false;
      this.imageShow = true;
      this.imageShengShow = true;
      this.isAllCampaign = null;
      (this.id = null), (this.form.mode = "0");
      this.form.sendUpType = "0";
      this.form.pattern = "0";
      // this.pushTimeType = 0;
      this.pushTimeType = 1; //推送时间现在改为立即推送
      this.form.imgOrTextVal = 1;
      this.form.timeVal = "";
      this.form.checkedCities = "";
      this.form.desc = "";
      this.form.titleName = "";
      this.personList = "";
      this.personListQudao = "";
      this.form.actSecenVal = "";
      this.form.titleval = "";
      this.actVal = "";
      this.form.checkedCitiesNum = "";
      this.handleChangeImgOrText();
      this.handleActIsShow();
      this.selectTreeData.ssName = "";
      this.selectTreeData.ssCode = "";
      this.selectTreeData.actId = "";
      this.selectTreeData.actName = "";
      this.treeHuongDongData = [];
      this.menDianTreeData = "";
      this.fileList = [];
      this.contentShow = true;
      this.tinymceisImgShow = true;
      this.form.sendUnitType = ""; //选取推送层级
      this.pushlevelShow = false; //选取推送层级隐藏
      this.pushlevelShowTow = false;
      this.form.isUpgrade = "0"; //是否升级 0 否 1 是
      this.upgradeShow = false; //是否升级隐藏
      this.form.filterType = ""; //升级条件
      this.form.filterCondit = ""; //触发条件
      this.form.threshold = "5"; //阈值
      this.form.upgradeTitle = ""; //du升级人员标题
      this.form.upgradeContent = ""; //du升级人员内容
      this.form.unitType = ""; //点击插入变量时候传的参数

      this.getReceiptList(); //回执页面配置数据
      this.htmlTempId = null;
      this.htmlTemp = null;
    },
    // 多选
    handleSelectionChange(val) {
      this.ids = [];
      val.map((item) => {
        this.ids.push(item.id);
      });
    },
    // 点击搜索
    searchData() {
      this.fetchTableList();
    },
    // 获取表格数据
    fetchTableList() {
      const {
        sendType,
        masterValue,
        iworkValue,
        numVaue,
        nameValue,
        secenValue,
        isOnlyScene,
        staffValue,
      } = this.dataForm;
      this.loadingTow = true;
      this.$http({
        url: this.$http.adornUrl("cpcpdu/list"),
        method: "get",
        params: this.$http.adornParams({
          page: this.pageNum,
          limit: this.pageSize,
          send_type: sendType,
          // jobNoLike: numVaue,
          // userName: nameValue,
          activity_id: secenValue,
          label_id: masterValue,
          group_id: iworkValue,
          isOnlyScene: isOnlyScene,
          staffValue: staffValue,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          setTimeout(() => {
            this.loadingTow = false;
            this.total = data.page.totalCount;
            this.dataList = data.page.list;
          }, 1000);
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    //编辑
    handleEdit(data) {
      // console.log("data.isYdWarn=", typeof data.isYdWarn);
      this.isDisbaled = false; //推送层级消失
      this.upgradeShow = false; //是否向上升级消失
      this.isImgShow = false; //推送升级标题
      this.contentShow = false; //推送升级内容
      this.imageShengShow = true; //推送升级内容的照片
      this.imageShow = true; //升级内容的照片
      this.form.isUpgrade = "0";
      this.isYdWarn = data.isYdWarn;
      console.log("data.isYdWarn=", this.isYdWarn);
      console.log("data.isYdWarn=", typeof this.isYdWarn);
      if (data.isYdWarn === 0) {
        this.id = data.id;
        this.pushlevelShow = false;

        this.$http({
          url: this.$http.adornUrl(`/cpcpdu/info/${this.id}`),
          method: "get",
          params: this.$http.adornParams({}),
        }).then((res) => {
          if (res.data.code === 0) {
            this.dialogVisible = true;

            let data = res.data.cpcpDu;
            console.log("---------------", data);
            this.form.desc = data.content;
            this.form.mode = data.sendType.toString();
            // this.form.sendUpType = data.sendUpType.toString();
            this.form.sendUpType =
              data.sendUpType === null ? "" : data.sendUpType.toString();
            // console.log("this.form.mode====", this.form.mode);
            // console.log("this.form.mode====", typeof this.form.mode);
            if (this.form.mode === "1") {
              this.msgShow = true;
              this.sendUpTypeShow = true;
            } else {
              this.msgShow = false;
              this.sendUpTypeShow = false;
            }
            this.msg = data.msg;
            this.form.timeVal =
              data.sendTime === "" || data.sendTime === null
                ? ""
                : data.sendTime.slice(0, 5);
            this.form.pattern =
              data.sendGroup === "" || data.sendGroup === null
                ? ""
                : data.sendGroup.toString();
            this.form.checkedCities = `${data.activityId},${data.activityName}`;
            this.actVal = data.activityName;

            this.form.titleName = data.title;
            this.form.isTogetherFlag = data.isTogether == null ? "0" : "1";
            this.togetherShow = true;
            if (data.activityName === "盯自定义群组推送") {
              this.qzwbtsShow = false;
            } else {
              // alert(data.title)
              this.qzwbtsShow = true;
            }
            this.isCycle = true;
            this.form.titleval = "";
            this.userType = data.userType; //之前编辑调接口没有获取这个字段（选择渠道视图会有问题），但是其他场景没影响，现在加上获取字段，问题解决
            this.pushTimeType = data.isTiming;
            this.form.groupId = data.groupId;
            this.form.iworkGroupId = data.iworkGroupId;
            // this.form.whether = data.whether //暂时没这个字段
            // this.form.whether = "2"; //暂时没这个字段
            this.form.whether = "2"; //暂时没这个字段
            // console.log("--------------groupName", data.groupName);
            // console.log("---------------labelName", data.labelName);
            this.isIwork = true;
            this.isPerson = true;
            // if(data.groupName != "" || data.groupName != null){
            //   alert("11111")
            //   this.isIwork = true
            // }
            // if(!data.labelName == "" || !data.labelName ==null){
            //   alert("2222")
            //   this.isPerson = true
            // }
            this.relaryGroupName = data.groupName;
            this.form.groupName = data.groupName;
            // this.lableVal = data.labelId
            //   ? `${data.labelName},${data.labelId}`
            //   : "";
            // this.lableVal = data.labelIds
            //   ? `${data.labelName},${data.labelIds}`
            //   : "";
            this.lableVal = data.labelIds ? `${data.labelIds}` : "";
            this.relaryLableName = data.labelName;
            this.form.imgOrTextVal = data.pattern;
            this.form.titleval = data.title + "," + data.content;
            if (data.activityId === "gxh_scene") {
              this.form.titleval = data.title + "," + data.originalContent;
            }
            if (data.activityId === "uim") {
              // this.form.titleval = data.title
              this.form.titleval = "UIM卡运营数字化";
              // this.form.titleval = data.title + "," + data.originalContent;
              // console.log("data.activityId====", data.activityId);
              // console.log("activityName====", data.activityName);
              // console.log("activityName====", this.actVal);
              this.pushlevelShowTow = true;
              this.isObjectShow = true;
              this.isTreeShow = true;
            }
            // if (data.activityId === "ydyj") {
            //   this.form.titleval = data.title + "," + data.originalContent;
            // }
            //自定义文本推送 修改成了富文本编辑器，编辑的时候titleval回显有问题，从新获取内容
            if (data.activityId === "cswbts") {
              // console.log("this.whetherShow===", this.whetherShow);
              this.titleList.map((item) => {
                if (item.dictName === "自定义文本推送") {
                  this.form.titleval = item.dictName + "," + item.remark;
                }
              });
              // 回显图片
              this.fileList = [];
              let imgStr = data.imgUrls.split(",");
              imgStr.map((item) => {
                let obj = {};
                obj.url = item;
                this.fileList.push(obj);
              });
              // 推送附件回显图片
              this.fileListFile = [];
              // let fileStr = data.fileUrls.split(",");
              let fileStr =
                data.fileUrls === "" || data.fileUrls === null
                  ? []
                  : data.fileUrls.split(",");
              console.log("fileStrfileStrfileStr", fileStr);
              fileStr.map((item) => {
                let obj = {};
                obj.name = item;
                obj.url = item;
                this.fileListFile.push(obj);
              });
            }
            //新回显的字段（异动预警）
            // this.form.sendUnitType = data.sendUnitType; //选取推送层级
            // this.pushlevelShow = true; //选取推送层级隐藏
            // this.form.isUpgrade = "0"; //是否升级 0 否 1 是
            // this.upgradeShow = false; //是否升级隐藏
            // this.form.filterType = ""; //升级条件
            // this.form.filterCondit = ""; //触发条件
            // this.form.threshold = "5"; //阈值
            // this.form.upgradeTitle = ""; //du升级人员标题
            // this.form.upgradeContent = ""; //du升级人员内容
            // this.form.actSecenVal = data.activitySplitId;
            // 判断 所有活动，还是 若干个活动  0 -> 若干活动  1-> 所有活动
            this.treeHuongDongData = [];
            this.isAllCampaign = data.isAllCampaign;
            if (data.isAllCampaign == 0) {
              let list = data.cpcpActivityList ? data.cpcpActivityList : []; //活动类型Id 逗号分割 最多4个
              let Actid = "";
              if (list) {
                list.map((item) => {
                  this.treeHuongDongData.push(item);
                  this.selectTreeData.actName += item.actName + ",";
                  Actid += item.actId + ",";
                  this.selectTreeData.actId = Actid.substring(
                    0,
                    Actid.length - 1
                  );
                });
              }
            } else {
              this.selectTreeData.actName = "所有活动";
            }
            if (data.storyStaffAccounts) {
              this.menDianTreeData = data.storyStaffAccounts;
              this.$refs.storeDialog.fetchAgainData(this.menDianTreeData);
            }
            this.dictValue =
              data.triggerType === "" || data.triggerType === null
                ? ""
                : data.triggerType.toString(); //触发类型
            this.form.calledNum = data.calledNum; //达标条件
            if (data.activityId === "hdcf" || data.activityId === "hdsx") {
              this.isActShow = true;
            }
            //企业微信
            if (data.activityName === "盯企业微信推送") {
              this.qywxShow = true;
              this.togetherShow = false;
              this.form.titleval = data.title;
            } else {
              this.qywxShow = true;
            }
            if (data.activityId === "qywx") {
              // 回显图片
              this.fileList = [];
              let imgStr = data.imgUrls.split(",");
              imgStr.map((item) => {
                let obj = {};
                obj.url = item;
                this.fileList.push(obj);
              });
              // 推送附件回显图片
              this.fileListFile = [];
              // let fileStr = data.fileUrls.split(",");
              let fileStr =
                data.fileUrls === "" || data.fileUrls === null
                  ? []
                  : data.fileUrls.split(",");
              console.log("fileStrfileStrfileStr", fileStr);
              fileStr.map((item) => {
                let obj = {};
                obj.name = item;
                obj.url = item;
                this.fileListFile.push(obj);
              });
            }
            this.form.wecomCompany = data.wecomCompany; //公司应用名称
            this.form.wecomUser = data.wecomUser; //企业微信推送人员
            this.form.wecomImgUrl = data.wecomImgUrl; //企业微信推 获取的附件URL
            this.weComeForm.wecomCompany = data.wecomCompany; //企业微信推 获取的附件URL
            this.handleChangepushType();
            this.handleChangeImgOrText();
            this.handleActSecon();
            this.getAgainCon(data.userType);
          }
        });
      } else {
        console.log("异动预警");
        this.id = data.id;
        console.log("data.duId===", data.id);
        this.isDisbaled = true;
        this.$http({
          url: this.$http.adornUrl(`/ydExpand/getYdScene/${this.id}`),
          method: "get",
          params: this.$http.adornParams({}),
        }).then((res) => {
          if (res.data.code === 0) {
            this.dialogVisible = true;
            console.log("data==", res.data.data);
            let data = res.data.data;
            // console.log("---------------", data);
            console.log("data.ydExpandId===", data.ydExpandId);
            this.ydExpandId = data.ydExpandId;

            // if (data.title === "异动预警-疑似异网营销") {
            if (data.title === "异动预警") {
              this.pushObjShow = true;
              let object = this.cycleList.find((item) => {
                console.log("item====", item);
                return item.dictName === "日";
              });
              console.log(object);
              this.cycle = object.id;
              this.cycleList = [];
              this.cycleList.push(object);
              console.log("-----", this.cycleList);
            } else {
              console.log("123456");
              this.fetchCycleData();
            }
            this.form.desc = data.content;
            this.form.mode = data.sendType.toString();
            this.form.sendUpType =
              data.sendUpType === null ? "" : data.sendUpType.toString();
            if (this.form.mode === "1") {
              this.msgShow = true;
              this.sendUpTypeShow = true;
            } else {
              this.msgShow = false;
              this.sendUpTypeShow = false;
            }
            this.msg = data.msg;
            this.form.timeVal = data.sendTime.slice(0, 5);
            this.form.pattern = data.sendGroup.toString();
            this.form.checkedCities = `${data.activityId},${data.activityName}`;
            this.actVal = data.activityName;
            this.form.titleName = data.title;
            this.pushTimeType = data.isTiming;
            this.form.groupId = data.groupId;
            this.form.iworkGroupId = data.iworkGroupId;
            // this.form.whether = data.whether //暂时没这个字段
            this.form.whether = "2"; //暂时没这个字段
            this.relaryGroupName = data.groupName;
            this.form.groupName = data.groupName;
            // this.lableVal = data.labelId
            //   ? `${data.labelName},${data.labelId}`
            //   : "";
            // this.lableVal = data.labelIds
            //   ? `${data.labelName},${data.labelIds}`
            //   : "";
            this.lableVal = data.labelIds ? `${data.labelIds}` : "";
            this.relaryLableName = data.labelName;
            this.form.imgOrTextVal = data.pattern;
            this.form.titleval = data.title + "," + data.content;
            // 自定义文本推送 , 分公司个性化场景, select, name ,content 回显
            // if (data.activityId === "gxh_scene" || data.activityId === "cswbts") {
            //   this.form.titleval = data.title + "," + data.originalContent;
            //   this.titleList.map(item => {
            //     if(item.dictName === "自定义文本推送"){
            //       this.form.titleval = item.dictName + "," + item.remark;
            //     }
            //   })
            // }
            if (data.activityId === "gxh_scene") {
              this.form.titleval = data.title + "," + data.originalContent;
            }
            if (data.activityId === "ydyj") {
              this.form.titleval = data.title;
              // console.log("-----------------", this.form.titleval);
              this.sceneCategoryShow = true;
              this.isCycle = false;
            }
            //自定义文本推送 修改成了富文本编辑器，编辑的时候titleval回显有问题，从新获取内容
            if (data.activityId === "cswbts") {
              // console.log("this.whetherShow===", this.whetherShow);
              this.titleList.map((item) => {
                if (item.dictName === "自定义文本推送") {
                  this.form.titleval = item.dictName + "," + item.remark;
                }
              });
              // 回显图片
              this.fileList = [];
              let imgStr = data.imgUrls.split(",");
              imgStr.map((item) => {
                let obj = {};
                obj.url = item;
                this.fileList.push(obj);
              });
            }
            //新回显的字段（异动预警）form.sendUnitType
            this.form.sendUnitType =
              data.sendUnitType === null ? "" : data.sendUnitType.toString(); //选取推送层级sendUnitType
            this.pushlevelShow = true; //选取推送层级隐藏
            this.form.isUpgrade = data.isUpgrade.toString(); //是否升级 0 否 1 是
            this.form.unitType =
              data.sendUnitType === null ? "" : data.sendUnitType.toString();
            console.log("data.activityLevelId==", data.activityLevelId);
            console.log("data.activityLevelId==", data.activityLevelName);
            this.form.titlevalDictValue = data.activityLevelId;
            // this.form.activityLevelId = data.activityLevelName//回显的场景类别名称
            console.log("this.form.sendUnitType==", this.form.sendUnitType);
            console.log(
              "this.form.sendUnitType==",
              typeof this.form.sendUnitType
            );
            console.log("this.form.isUpgrade====", this.form.isUpgrade);
            console.log("this.form.isUpgrade====", typeof this.form.isUpgrade);
            switch (this.form.sendUnitType) {
              case "2":
                this.pushObjName = "二级单元";
                break;
              case "3":
                this.pushObjName = "三级单元";
                break;
              case "4":
                this.pushObjName = "四级单元";
                break;
              case "5":
                this.pushObjName = "五级单元";
                break;

              default:
                this.pushObjName = "";
                break;
            }
            if (this.form.isUpgrade === "0") {
              this.upgradeShow = false; //是否升级隐藏
            } else {
              this.upgradeShow = true; //是否升级隐藏
            }

            this.form.filterType =
              data.filterFieldType === null
                ? ""
                : data.filterFieldType.toString(); //升级条件
            this.form.filterCondit =
              data.filterCondit === null ? "" : data.filterCondit.toString(); //触发条件
            this.form.threshold = data.threshold; //阈值
            this.form.upgradeTitle = data.upgradeTitle; //du升级人员标题
            this.form.upgradeContent = data.upgradeContent; //du升级人员内容

            // this.form.actSecenVal = data.activitySplitId;
            // 判断 所有活动，还是 若干个活动  0 -> 若干活动  1-> 所有活动
            this.treeHuongDongData = [];
            this.isAllCampaign = data.isAllCampaign;
            if (data.isAllCampaign == 0) {
              let list = data.cpcpActivityList ? data.cpcpActivityList : []; //活动类型Id 逗号分割 最多4个
              let Actid = "";
              if (list) {
                list.map((item) => {
                  this.treeHuongDongData.push(item);
                  this.selectTreeData.actName += item.actName + ",";
                  Actid += item.actId + ",";
                  this.selectTreeData.actId = Actid.substring(
                    0,
                    Actid.length - 1
                  );
                });
              }
            } else {
              this.selectTreeData.actName = "所有活动";
            }
            if (data.storyStaffAccounts) {
              this.menDianTreeData = data.storyStaffAccounts;
              this.$refs.storeDialog.fetchAgainData(this.menDianTreeData);
            }
            this.dictValue = data.triggerType.toString(); //触发类型
            this.form.calledNum = data.calledNum; //达标条件
            if (data.activityId === "hdcf" || data.activityId === "hdsx") {
              this.isActShow = true;
            }
            this.handleChangepushType();
            this.handleChangeImgOrText();
            this.handleActSecon();
            this.getAgainCon(data.userType);
          }
        });
      }
    },
    // 判断是哪种类型，人员或者群组，然后回显
    getAgainCon(val) {
      console.log("val====val", val);
      console.log("this.changeName====this.changeName", this.changeName);
      console.log(
        "this.changeName====this.this.form.groupId",
        this.form.groupId
      );
      switch (val) {
        case 1:
          this.changeName = "选择主数据人员";
          console.log("00000000000000000000000000000000000000000000");
          this.$refs.send.fetchAgainData(this.form.groupId);
          break;
        case 2:
          this.changeName = "选择主数据群组";
          // this.fetchAgainGroupData(this.lableVal.split(",")[1]); // 主数据群组回显
          this.fetchAgainGroupData(this.lableVal); // 主数据群组回显
          console.log(
            "this.lableValthis.lableValthis.lableVal==",
            this.lableVal
          );
          console.log(
            "this.lableValthis.lableValthis.lableVal==",
            typeof this.lableVal
          );
          console.log(
            "this.lableValthis.lableValthis.lableVal==",
            this.lableVal.split(",")
          );
          break;
        case 3:
          this.changeName = "选择Iwork群组";
          break;
        case 4:
          this.changeName = "监控门店类型";
          break;
      }
      this.handleActIsShow("回显");
    },
    //图片预览-弹框
    choiceImg(imgNum) {
      console.log("lmgnum=====", imgNum);
      this.dialogChoiceImg = true;
      this.imgsGroupTow.forEach((element) => {
        if (element.indexImg == imgNum) {
          // alert(element.indexImg)
          this.imgUrl = element.url;
        }
      });
      // this.imgUrl =
    },

    // 删除
    // 点击删除或者批量删除
    handleDelete(id) {
      let ids = [];
      if (id) {
        ids = [id];
      } else {
        ids = this.ids;
        if (this.ids.length == 0) {
          this.$message.error("请先选择要删除的选项");
          return false;
        }
      }
      this.$confirm(`您确定要删除吗`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$http({
            url: this.$http.adornUrl("/cpcpdu/delete"),
            method: "post",
            data: this.$http.adornData(ids, false),
          }).then(({ data }) => {
            if (data && data.code === 0) {
              this.$message({
                message: "操作成功",
                type: "success",
                duration: 1500,
                onClose: () => {
                  this.fetchTableList();
                },
              });
            } else {
              this.$message.error(data.msg);
            }
          });
        })
        .catch(() => {});
    },
    //获取回执页面配置数据
    choiceReceipt() {
      // alert("1111")
      this.receiptDialog = true;
    },
    //清空-之前选择的回执页面选项
    choiceEmpty() {
      this.htmlTempId = null;
      this.htmlTemp = null;
      console.log("htmlTempId=", this.htmlTempId, "tempName==", this.htmlTemp);
    },
    //推送内容里面的插入变量
    getVariable() {
      this.$http({
        url: this.$http.adornUrl("ydWarn/getColum"),
        method: "get",
        params: this.$http.adornParams({
          unitType: parseInt(this.form.unitType) || "",
        }),
      }).then(({ data }) => {
        // console.log("res=====", res);
        if (data && data.code === 0) {
          console.log("------", data.data);
          this.variableData = data.data;
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    //推送内容里面的插入变量-UIM卡运营数字化视图月报
    getVariableTow() {
      this.$http({
        url: this.$http.adornUrl("/uimWarn/getColum"),
        method: "get",
        params: this.$http.adornParams({
          unitType: parseInt(this.form.unitType) || "",
        }),
      }).then(({ data }) => {
        // console.log("res=====", res);
        if (data && data.code === 0) {
          console.log("------", data.data);
          this.variableDataTow = data.data;
        } else {
          this.$message.error(data.msg);
        }
      });
    },
    //光标
    testBlur(e) {
      this.blurIndex = e.srcElement.selectionStart;
    },
    //点击插入变量
    bianliangBtn() {
      console.log("=====", this.form.unitType);

      if (this.form.unitType === "" || this.form.unitType === null) {
        console.log("哈哈哈");
        this.$message({
          message: "请选取推送层级",
          type: "info",
          duration: "1000",
        });
        return;
      } else {
        this.bianliangShow = true;
      }
      this.getVariable();
    },
    // 回执页面配置数据
    getReceiptList() {
      this.$http({
        url: this.$http.adornUrl("/htmlTemp/getHtmlTemp"),
        method: "get",
        params: this.$http.adornParams({
          tempName: this.tempName,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          console.log("data===", data);
          setTimeout(() => {
            this.receiptList = data.data;
          }, 1000);
        } else {
          this.$message.error(data.msg);
          this.receiptList = [];
        }
      });
    },
    //handleReceipt 回执页面配置弹框-后面的选择按钮
    handleReceipt(id, tempName) {
      this.htmlTempId = id;
      this.htmlTemp = tempName;
      console.log("htmlTempId=", this.htmlTempId, "tempName==", this.htmlTemp);
      this.receiptDialog = false;
      this.tempName = "";
    },
    //UIM卡运营数字化视图月报 bianliangBtn
    bianliangBtnTow() {
      this.bianliangShowTow = true;
      this.getVariableTow();
    },
    //芜湖 - 插入变量按钮
    bianliangBtnTowWuHu() {
      if (this.form.tableName === "" || this.form.tableName === null) {
        console.log("哈哈哈");
        this.$message({
          message: "请选取数据表",
          type: "info",
          duration: "1000",
        });
        return;
      } else {
        this.bianliangShowWuHu = true;
      }
    },
    // 芜湖 - 数据展示按钮
    imgBtnTowWuHu() {
      if (this.form.tableName === "" || this.form.tableName === null) {
        console.log("哈哈哈");
        this.$message({
          message: "请选取数据表",
          type: "info",
          duration: "1000",
        });
        return;
      } else {
        console.log("dedeee");
        console.log("form.tableName=", this.form.tableName);
        let tableName = this.form.tableName;

        // this.bianliangShowWuHu = true;
        if (this.form.tableName == "cpcp_tb_zj_clwx_5j_qd") {
          this.$message({
            message: "暂无图片",
            type: "info",
            duration: "1000",
          });
        } else {
          this.getWuhuImg(tableName);
        }
      }
    },
    //获取对应的 数据展示图片
    getWuhuImg(tableName) {
      this.wuhuImg = "";
      this.$http({
        url: this.$http.adornUrl("/CpcpTbZjClwx3jQd/writeExcelToImg"),
        method: "get",
        params: this.$http.adornParams({
          tableName,
          staffAccount: this.staffAccount,
        }),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          console.log("data===", data);
          this.wuhuImg = data.data;
          this.wuhuImgVisible = true;
        } else {
          this.$message.error(data.msg);
          this.wuhuImg = "";
        }
      });
    },
    //点击查看图片按钮
    imgsBtn() {
      console.log("=====", this.form.unitType);
      if (this.form.unitType === "" || this.form.unitType === null) {
        console.log("哈哈哈");
        this.$message({
          message: "请选取推送层级",
          type: "info",
          duration: "1000",
        });
        return;
      } else {
        // this.bianliangShow = true;
        this.imagesType = this.form.unitType;
        this.imageShow = false;
        if (this.form.unitType === "5") {
          this.$message({
            message: "暂无图片",
            type: "info",
            duration: "1000",
          });
        }
      }
    },
    //点击查看升级图片按钮
    imgsShengBtn() {
      if (this.form.unitType === "" || this.form.unitType === null) {
        console.log("哈哈哈");
        this.$message({
          message: "请选取推送层级",
          type: "info",
          duration: "1000",
        });
        return;
      } else {
        this.imagesShengType = this.form.unitType;
        this.imageShengShow = false;
      }
    },
    choiceLable() {
      console.log("-------------", this.form.whether);
      console.log("-------------", typeof this.form.whether);
      if (this.form.whether === "1") {
        this.lableNmaeInput = "已选人员";
      } else {
        this.lableNmaeInput = "已选主数据人员";
      }
    },
    //是否同一批次
    choiceTogetherFlag() {
      console.log("-------------", this.form.isTogetherFlag);
      console.log("-------------", typeof this.form.isTogetherFlag);
    },
    //确定选择
    onSubmit() {
      // this.checkList = []
      console.log("this.checkList==", this.checkList);
      console.log("this.form.desc====", this.form.desc);
      let checkStr = "";
      let newcheckStr = "";
      this.checkList.forEach((element) => {
        // console.log("element",element);
        checkStr += "${" + element + "},";
      });
      newcheckStr = checkStr.substring(0, checkStr.length - 1);
      console.log("checkStr", checkStr);
      // this.form.desc = this.form.desc + checkStr;
      let index = this.blurIndex;
      let str = this.form.desc;
      this.form.desc = str.slice(0, index) + newcheckStr + str.slice(index);
      console.log("this.form.desc====", this.form.desc);
      this.bianliangShow = false;
      this.bianliangShowTow = false;
      this.checkList = [];
    },
    //确认选择 - 芜湖
    onSubmitWuHU() {
      console.log("this.checkListWuHu==", this.checkListWuHu);
      console.log("this.form.desc====", this.form.desc);
      console.log("wuhuTable==", this.wuhuTable);
      let checkStr = "";
      let newcheckStr = "";
      this.checkListWuHu.forEach((element) => {
        // console.log("element",element);
        this.wuhuTable.forEach((e2) => {
          if (element == e2.colum) {
            checkStr += e2.note + "${" + element + "},";
          }
        });
        // checkStr += "${" + element + "},";
      });
      console.log("几级数据表==", this.form.tableName);
      newcheckStr = checkStr.substring(0, checkStr.length - 1);
      console.log("checkStr", checkStr);
      // this.form.desc = this.form.desc + checkStr;
      let index = this.blurIndex;
      let str = this.form.desc;
      this.form.desc = str.slice(0, index) + newcheckStr + str.slice(index);
      if (this.form.tableName == "cpcp_tb_zj_clwx_2j_qd") {
        this.form.desc = this.form.desc.replace(/sum_yjcj_3j/g, "sum_yjcj3j");
      }
      console.log("this.form.desc====", this.form.desc);
      this.bianliangShow = false;
      this.bianliangShowTow = false;
      this.bianliangShowWuHu = false;
      this.checkListWuHu = [];
    },
    // 再次提醒
    // 分页
    pageChange(page) {
      this.pageSize = page._pageSize;
      this.pageNum = page._currentPage;
      this.fetchTableList();
    },
    //excel上传
    // 上传成功(热门文章)
    uploadSuccess(response, file, fileList) {
      // console.log("11111111111", response);
      this.uploadForm.batchId = response.data.batchId;
      this.uploadForm.pushNames = response.data.pushNames;
      this.uploadForm.upgradeNames = response.data.upgradeNames;
      this.form.groupId = this.uploadForm.batchId;
      this.personList = this.uploadForm.pushNames; //升级人员
      this.shengjiList = this.uploadForm.upgradeNames; //推送人员
      if (response.code === 500) {
        this.$message.error(response.msg);
      } else {
        this.$message.success("上传成功");
        // this.getPerson();
      }
    },
    // 上传失败(热门文章)
    uploadError(response, file, fileList) {
      this.$message.error("上传失败，请联系管理员");
    },
    // 上传成功(推送文本)
    uploadSuccessFile(response, file, fileListFile) {
      console.log("11111111111", response);
      console.log("2222222", file);
      console.log("2222222", file.response.data);
      console.log("3333333", fileListFile);
      if (response.code === 500) {
        this.$message.error(response.msg);
        this.$refs.fileAction.clearFiles();
      } else {
        this.$message.success("上传成功");
        let data = {};
        data.url = response.data;
        console.log("data=====", data);
        // this.fileListFile.push(data);
        fileListFile.forEach((element) => {
          console.log("element===", element);
          data.name = element.name;
        });
        this.fileListFile.push(data);
      }
    }, // 上传失败(热门文章)
    uploadErrorFile(response, file, fileListFile) {
      this.$message.error("上传失败，请联系管理员");
    },
    handleExceedFile(files, fileListFile) {
      this.$message.warning(
        `当前限制选择 10 个文件，本次选择了 ${files.length} 个文件，共选择了 ${
          files.length + fileListFile.length
        } 个文件`
      );
    },
    beforeRemoveFile(file, fileListFile) {
      console.log("file===", file);
      console.log("file===", fileListFile);
      let ss = file.url;
      let index = ss.lastIndexOf("/");
      let result = ss.substr(index + 1, ss.length);
      this.fileListFile = fileListFile.slice(-3);
      console.log("resultresultresult===", result);
      console.log("file===77777777777777777777", fileListFile);
      // this.$confirm(`确定移除 ${result}？`, '提示', {
      //     confirmButtonText: '确定',
      //     cancelButtonText: '取消',
      //     type: 'warning'
      //   }).then(() => {
      //     this.fileListFile = fileListFile.slice(-3);
      //     this.$message({
      //       type: 'success',
      //       message: '删除成功!'
      //     });
      //   }).catch(() => {
      //     this.$message({
      //       type: 'info',
      //       message: '已取消删除'
      //     });
      //   });
    },
    handlePreviewFile(file) {
      console.log("-------------", file);
    },
    //模板下载
    downLoad() {
      console.log("推送模板下载");
      console.log(this.action);
      //return
      window.open(this.action);
    },
    //点击触发条件后面的确定
    threSymbol(item) {
      console.log(item);
      this.form.threSymbol = item;
      this.sendStaffAccount();
    },
    subThreshold() {
      console.log("1111", this.form.threSymbol);
      console.log("2222", this.form.triggerCondition);
    },
    // // 设置光标位置
    setCaretPosition(textDom) {
      console.log("22222");
      console.log("textDom", textDom);
    },
    //预览大图
    ShowpreviewPic(obj) {
      // let url = '~@/assets/imtTow/5.png'
      console.log("url=", obj);
      this.previewpic = obj.tempUrl + "?imgUrls=" + obj.imgUrls;
      console.log("this.previewpic===", this.previewpic);
      // this.previewpic = this.url;
      // this.previewpic = `http://134.64.251.212:8084/cpcp/htmlUrl/测试0601-7.html?imgUrls=http://134.64.251.212:8084//cpcp/imgUrl/duSix.png`;
      this.lookdialogVisible = true;
    },
  },
};
</script>
<style scoped lang="scss">
@import "../../../assets/scss/span_color";
.preview {
  text-align: center;
}
.preview_img {
  text-align: center;
}
.group {
  display: flex !important;
}
.red {
  color: yellow;
}
.green {
  color: green;
}
.push_tag {
  // background: red;
  width: 100%;
}
.cell img {
  width: 50%;
  height: 50%;
}

.button {
  width: 130px;
  height: 40px;
  background: linear-gradient(to bottom, #4eb5e5 0%, #389ed5 100%); /* W3C */
  border: none;
  border-radius: 5px;
  position: relative;
  border-bottom: 4px solid #2b8bc6;
  color: #fbfbfb;
  font-weight: 600;
  font-family: "Open Sans", sans-serif;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
  font-size: 15px;
  text-align: left;
  text-indent: 5px;
  box-shadow: 0px 3px 0px 0px rgba(0, 0, 0, 0.2);
  cursor: pointer;

  /* Just for presentation */
  // display: block;
  margin: 0 auto;
  margin-bottom: 20px;
}
.button:active {
  box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.2);
  top: 1px;
}

.button:after {
  content: "";
  width: 0;
  height: 0;
  display: block;
  border-top: 20px solid #187dbc;
  border-bottom: 20px solid #187dbc;
  border-left: 16px solid transparent;
  border-right: 20px solid #187dbc;
  position: absolute;
  opacity: 0.6;
  right: 0;
  top: 0;
  border-radius: 0 5px 5px 0;
}

/* Button pointing left */

.button.back {
  text-align: right;
  padding-right: 12px;
  box-sizing: border-box;
}
.button.back:after {
  content: "";
  width: 0;
  height: 0;
  display: block;
  border-top: 20px solid #187dbc;
  border-bottom: 20px solid #187dbc;
  border-right: 16px solid transparent;
  border-left: 20px solid #187dbc;
  position: absolute;
  opacity: 0.6;
  left: 0;
  top: 0;
  border-radius: 5px 0 0 5px;
}

/* Single buttons */

.button.site {
  width: 40px;
  text-align: center;
  text-indent: 0;
}
.button.site:after {
  display: none;
}
.threshold_span .el-tag[data-v-76313d94] {
  border: none;
  margin: 0 3px;
  cursor: pointer;
}
.el-textarea {
  width: 92%;
}
.charuBianLiang {
  position: absolute;
  top: -2px;
  right: -5px;
}
.charuImgas {
  position: absolute;
  top: 29px;
  right: -5px;
}
.ShengImgas {
  position: absolute;
  top: 15px;
  right: -5px;
}
// .tuiSong_dialog .el-dialog__body{
//   height: 500px;
//   overflow: auto;
// }
.checkList_box {
  height: 450px;
  overflow: auto;
  margin-bottom: 20px;
  // display: inline-block;
  // display: flex;
  // justify-content: space-around;
  // margin: 0 5px;
}
.checkList_box div {
  margin-left: 20px;
}
.checkList_box /deep/ .el-checkbox__label {
  color: wheat;
}
.onSubmit_button {
  text-align: center;
}
.upload-demo /deep/ .el-upload-list__item-name {
  color: #3e8ef7 !important;
}
/deep/ .el-table .cell,
.el-table th div {
  overflow: none !important;
  text-overflow: initial !important;
}
.choice_btn div {
  width: 33%;
  // margin-top: 20px;
}
.choice_btn div .buttonClass {
  width: 8.4375rem;
}

.el-button--button_there {
  background-color: rgb(250, 200, 88) !important;
  border-color: rgb(250, 200, 88) !important;
  color: #fff;
}
</style>
<style scoped>
.iframe_box {
  /* overflow-y: scroll; */
  height: 110vh;
  width: 100%;
  background: white;
}
#mainIframe {
  height: 100%;
  width: 100%;
  /* pointer-events: unset; */
  pointer-events: none;
}
</style>
